For MediaWiki (recent comments | status changes | tags | authors | states | release notes | statistics)
+ var count = $( 'input[type=checkbox].fbd-filters-check').length; + if(count > 1) {
Does this work properly? It seems to rely on the state of the checkbox to have switched to 'checked' prior to the click handler being executed. It would be simpler to just unconditionally uncheck all checkboxes except 'this', like so:
$( 'input[type=checkbox].fbd-filters-check' ).click( function() { $( 'input[type=checkbox].fbd-filters-check' ).not( this ).prop( 'checked', false ); } );
then it doesn't matter when the checkbox changes state, and you're not trying to set checked to true while the browser will already do that for you.
Ahh very cool. I knew there was an easier way :) Thanks
Also, you were correct. On this revision it wasn't working correctly.