Difference between revisions of "User:KamranMackey/common.js"
Jump to navigation
Jump to search
KamranMackey (talk | contribs) (Actually, scratch that. Blanked the page.) |
KamranMackey (talk | contribs) (Added some new JS which makes the infoboxes collapsible.) |
||
| Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | |||
/** Infobox collapsing script **/ | |||
$(".infoboxBlockImage img").each(function(){ | |||
width = parseInt($(this).attr("width"), 10); | |||
if(width > 240){ | |||
$(this).attr("height",""); | |||
$(this).attr("width","240"); | |||
} | |||
}); | |||
Revision as of 02:17, 21 February 2015
/* Any JavaScript here will be loaded for all users on every page load. */
/** Infobox collapsing script **/
$(".infoboxBlockImage img").each(function(){
width = parseInt($(this).attr("width"), 10);
if(width > 240){
$(this).attr("height","");
$(this).attr("width","240");
}
});