Created
August 22, 2013 11:55
-
-
Save stugoo/6306256 to your computer and use it in GitHub Desktop.
highlighting a table cell and all others behind it until the first item.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
calendarTo.on('mouseover', 'td', function(){ | |
var tds = calendarTo.find('td').not('.ui-datepicker-other-month'); | |
fromTd = tds.filter('.ui-state-range:first'); | |
thisTd = $(this); | |
startIndex = tds.index(fromTd); | |
endIndex = tds.index(thisTd)+1; | |
if(startIndex < 0) startIndex = 0; | |
tds.slice(startIndex, endIndex).addClass(hoverClass); | |
}).on('mouseout',function(){ | |
$('#date-to-container .'+hoverClass).removeClass(hoverClass); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment