Forum:Script doesn't work in monobook

I made a little script to automatically "clear" the section named "Navigazione", the code is: I don't know why it works in Oasis but it doesn't in Monobook. Any ideas?


 * You should put that piece of code inside a function that gets executed once the page is entirely loaded. In oasis the JS is loaded at the end of the page, but in monobook it's loaded earlier. Your JS is being executed before the span#Navigazione element gets rendered on the page, so it doesn't find it. This would solve the problem:

$(function {   $('span#Navigazione').parent.css('clear', 'both'); });
 * You may also try to save that JS trick by including the heading inside the template, and then putting a or a  before the heading. --Category:Ciencia Al Poder  (talk) -WikiDex 18:23, January 23, 2012 (UTC)


 * Thank you! I have already the template Clear, but I did tha JS to save the time to check all the sections.