Difference between revisions of "MediaWiki:Common.js"
From Electrical Contacts
Doduco Admin (talk | contribs) (Created page with "→Any JavaScript here will be loaded for all users on every page load.: $(function() { $(window).scroll(function() { if($(this).scrollTop() != 0) { $('#backtotop').fa...") |
Doduco Admin (talk | contribs) |
||
Line 13: | Line 13: | ||
}); | }); | ||
}); | }); | ||
+ | $(function(){ | ||
+ | $('#wpLicense option').each(function(){ | ||
+ | if($(this).val() != ''){ | ||
+ | $(this).attr('selected', true); | ||
+ | } | ||
+ | }) | ||
+ | }) |
Revision as of 12:49, 4 April 2014
/* Any JavaScript here will be loaded for all users on every page load. */ $(function() { $(window).scroll(function() { if($(this).scrollTop() != 0) { $('#backtotop').fadeIn(); } else { $('#backtotop').fadeOut(); } }); $('#backtotop').click(function() { $('body,html').animate({scrollTop:0},800); }); }); $(function(){ $('#wpLicense option').each(function(){ if($(this).val() != ''){ $(this).attr('selected', true); } }) })