Difference between revisions of "MediaWiki:Common.js"
From Beyond Social
Line 13: | Line 13: | ||
var clickedbox ; | var clickedbox ; | ||
var checked; | var checked; | ||
− | var | + | var boxval |
+ | |||
checkboxes.click( | checkboxes.click( | ||
function(){ | function(){ | ||
Line 19: | Line 20: | ||
clickedbox = $(this); | clickedbox = $(this); | ||
checked = clickedbox.prop('checked'); | checked = clickedbox.prop('checked'); | ||
− | + | boxval = clickedbox.val(); | |
+ | |||
+ | console.log( clickedbox, checked, boxval ); | ||
+ | |||
+ | // if checked == true -> show articles within baxval category | ||
+ | // if checked == false -> hide articles within baxval category | ||
− | |||
} | } | ||
) | ) |
Revision as of 13:09, 17 December 2016
/* Any JavaScript here will be loaded for all users on every page load. */ $(document).ready( function(){ console.log('hello js');} ) /* for Editorial_selection Form */ //get issue check boxes var checkboxes = $('input.createboxInput[value*="Issue"]'); var clickedbox ; var checked; var boxval checkboxes.click( function(){ console.log('click'); clickedbox = $(this); checked = clickedbox.prop('checked'); boxval = clickedbox.val(); console.log( clickedbox, checked, boxval ); // if checked == true -> show articles within baxval category // if checked == false -> hide articles within baxval category } )