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>

Comments

clemens.tolboom’s picture

Try something like

$(document).ready(function() {

instead

clemens.tolboom’s picture

Try something like

$(document).ready(function() {

instead