From b992b87bcbe584bc9644889a0200af2c64d6ceb9 Mon Sep 17 00:00:00 2001 From: Sanj Date: Fri, 10 Aug 2012 02:04:09 +0530 Subject: [PATCH] js to handle notfirst / notlast logic --- chaloBEST/templates/fuzzystops.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/chaloBEST/templates/fuzzystops.html b/chaloBEST/templates/fuzzystops.html index b055fb0..1ffb4d0 100644 --- a/chaloBEST/templates/fuzzystops.html +++ b/chaloBEST/templates/fuzzystops.html @@ -36,6 +36,17 @@ $(function() { var that = this; saveUNR(that, true); }); + + $('.fromStopSelect').change(function() { + var firstOpt = $(this).children().first(); + firstOpt.attr("selected") ? $(this).removeClass("notfirstStop") : $(this).addClass("notfirstStop"); + }); + + $('.toStopSelect').change(function() { + var lastOpt = $(this).children().last(); + lastOpt.attr("selected") ? $(this).removeClass("notlastStop") : $(this).addClass("notlastStop"); + }); + }); function saveUNR(elem, markChecked) {