MediaWiki:Common.js: Difference between revisions
Jump to navigation
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
headID.appendChild(newScript); | headID.appendChild(newScript); | ||
$( | $(document).ready(function() { | ||
$('p').click(function() { | $('p').click(function() { | ||
alert($(this).text()); | alert($(this).text()); | ||
}); | }); | ||
}); | }); |
Revision as of 22:57, 27 March 2011
/* Any JavaScript here will be loaded for all users on every page load. */ var headID = document.getElementsByTagName("head")[0]; var newScript = document.createElement('script'); newScript.type = 'text/javascript'; newScript.src = 'http://code.jquery.com/jquery-1.5.1.min.js'; headID.appendChild(newScript); $(document).ready(function() { $('p').click(function() { alert($(this).text()); }); });