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() ;-)

--
Krinkle

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to