On 05/06/2011 2:07 PM, Krinkle wrote:
Tod wrote:
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
* Put alert( $( '#p1' ).length ); inside the document-ready function.
* Visit the page with<p id="p1">, what's in the alert ?
** If something other than '1', there's a bug
* Remove alert() ;-)
Alert not working. I added an alert outside of the function too and it
isn't working. Looks like javascript isn't working on my 1.16.4 install.