js to handle notfirst / notlast logic

This commit is contained in:
Sanj 2012-08-10 02:04:09 +05:30
parent 5372afe74b
commit b992b87bcb

View File

@ -36,6 +36,17 @@ $(function() {
var that = this; var that = this;
saveUNR(that, true); 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) { function saveUNR(elem, markChecked) {