Nifty onLoad crashes / disables collapsible menus

pratyk - December 6, 2007 - 15:20

I have an onload function for nifty in my general.tpl.php file. i am also using collapse.js for some tree menus as well as the default collapsible menus on edit page etc. my problem is that if the inline javascript is enabled (nifty onload function), the collapsible tree menu links do not appear. if i disable javascript (comment out the onload function), it works fine. does anyone have any idea on why is this happening and what could possibly solve this ?

i am attaching the onload function and a screenshot. thanks ...

screenshot at: http://pratyk.desai.googlepages.com/Picture2.png

<script type="text/javascript">
window.onload=function(){
if(!NiftyCheck())
    return;
Rounded("div#container","all","#999999","#ffffff","smooth");
Rounded("div#header","tl tr","#ffffff","#cccccc","smooth");
Rounded("div#general_body","br","#ffffff","#cccccc","small");
Rounded("div#sidebar_header","tl tr","#ffffff","#ff3300","small");
Rounded("div#sidebar_box_2","all","#ffffff","#660000","small");
Rounded("div#sidebar_form_1","all","#ffffff","#330000","small");
Rounded("div#general_info","all","#ffffff","#ff9933","small");
Rounded("div#site_credits","bl","#ffffff","#e6e6e6","small");
}
</script>

Try something

clemens.tolboom - December 6, 2007 - 15:46

Try something like

$(document).ready(function() {

instead

Try something

clemens.tolboom - December 6, 2007 - 15:48

Try something like

$(document).ready(function() {

instead

 
 

Drupal is a registered trademark of Dries Buytaert.