MediaWiki:Common.js: Difference between revisions

From Wiki Grepolis EN
Jump to navigation
No edit summary
No edit summary
Line 6: Line 6:
newScript.src = 'http://code.jquery.com/jquery-1.5.1.min.js';
newScript.src = 'http://code.jquery.com/jquery-1.5.1.min.js';
headID.appendChild(newScript);
headID.appendChild(newScript);
$('document').ready(function() {
$('p').click(function() {
alert($(this).text());
});
});

Revision as of 22:56, 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());
});
});