YouTube Roundup 1
Funny, weird or cool videos I’ve enjoyed recently in no particular order.
Here is all my content that's not worth posting to Facebook, Twitter, my portfolio, etc. And also the best of my content from those places. Have fun figuring out which is which.
Powered by WordPress and running a bastardized version of Jim Barraud's Manifest theme.
You can contact me by leaving a comment or directly via hi@aaronlaibson.com.
Funny, weird or cool videos I’ve enjoyed recently in no particular order.
Tagged: around the internet, lol, videos
$("#popup-dates select").change(function() {
var fromMonth = new Number( $('#month-from').val() );
var toMonth = new Number( $('#month-to').val() );
if ( fromMonth > toMonth ) {
$('#month-to').val($('#month-from').val());
}
});
I’m working on a project where the visitor searches for info in a date range, selecting a From: month (#month-from) and a To: month (#month-to) within the same year. This code automatically advances #month-to to equal #month-from if the visitor tries to make a selection where #month-to would be earlier than #month-from, creating a reverse timespan (ie. trying to search from June to January within the same year).
The code does the following:
The most important part to note, though, is using $(“#popup-dates select”).change() as opposed to $(“#popup-dates option”).click(). For some reason the latter, which is semantically more accurate, simply doesn’t work in WebKit browsers like Chrome and Safari. Using $(“#popup-dates select”).change() will work in every browser, even IE6.
Hope this can save someone some time.
Tagged: around the internet, jquery, tips, web development