On 04/25/2011 12:32 PM, Max Semenik wrote:
> On 25.04.2011, 18:43 Tod wrote:
>
>> I've modified Mediawiki:Common.js to include the following:
>
>> document.getElementById("p1").innerHTML="New text!";
>
>
>> I then created a page called testPage and inserted:
>
>> <p id="p1">Hello World!</p>
>
>
>> I'm expecting the text to change upon load but nothing is happening.
>> Prior to the<p> tag addition I had an alert that was working as
>> expected so at least I know Common.js is working.
>
>> What is the best practice for adding custom javascript code in
>> Mediawiki? While we're at it is there a real good tutorial on including
>> AJAX calls w/o needing an extension anywhere?
>
>
> $( document ).ready( function() {
> $( '#p1' ).html( 'New text by jQuery!' );
> });
>
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?
Thanks - Tod
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l