1/** 2 * For the searchtags syntax: make the checkboxes behave like radio buttons 3 * so the user can't both include and exclude a tag 4 */ 5jQuery(function() { 6 jQuery('form.plugin__tag_search table input').change(function() { 7 if (jQuery(this).attr('checked')) { // was this input checked? 8 if (jQuery(this).parent().hasClass('minus')) { 9 // find the other input in the same tr and uncheck it 10 jQuery(this).closest('tr').find('.plus input').attr('checked', false); 11 } else { 12 jQuery(this).closest('tr').find('.minus input').attr('checked', false); 13 } 14 } 15 }) 16}); 17