On 05/05/2011 2:53 PM, Max Semenik wrote:
On 05.05.2011, 22:29 Tod wrote:
Ok, upgraded to 1.16.4 (from 1.13.2) but this
didn't work. Is there an
extension or something I must include or should it all be part of the
base upgrade?
You're on 1.16, which doesn't include jQuery on every page view. Use
the snippet from
http://www.mediawiki.org/wiki/JQuery#Before_ResourceLoader
to do that.
Bottom of LocalSettings.php:
// Include jQuery
function wfIncludeJQuery() {
global $wgOut;
$wgOut->includeJQuery();
}
$wgExtensionFunctions[] = 'wfIncludeJQuery';
Common.js:
$( document ).ready( function() {
$( '#p1' ).html( 'New text by jQuery!' );
});
/testPage:
<p id="p1">Hello World!</p>
Not working. Best way to debug?
Thanks - Tod