Difference between revisions of "MediaWiki:Common.js"
From Beyond Social
| Line 12: | Line 12: | ||
var checkboxes = $('input.createboxInput[value*="Issue"]'); | var checkboxes = $('input.createboxInput[value*="Issue"]'); | ||
var clickedbox ; | var clickedbox ; | ||
| − | + | var checked; | |
| + | var box | ||
checkboxes.click( | checkboxes.click( | ||
function(){ | function(){ | ||
console.log('click'); | console.log('click'); | ||
clickedbox = $(this); | clickedbox = $(this); | ||
| − | console.log( clickedbox ); | + | clickedbox.prop('checked'); |
| + | box = clickedbox.val(); | ||
| + | |||
| + | console.log( clickedbox, checked, box ); | ||
} | } | ||
) | ) | ||
Revision as of 13:03, 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 box
checkboxes.click(
function(){
console.log('click');
clickedbox = $(this);
clickedbox.prop('checked');
box = clickedbox.val();
console.log( clickedbox, checked, box );
}
)