Log in

View Full Version : CSS Frame and jqueryslidemenu.js interaction



bt1
06-04-2009, 07:14 PM
I can get a webpage to use jqueryslidemenu fine if that is all that there is, but I want to use a CSS top frame and insert my jqueryslidemenu in there. I can get it to show up but I cannot get it to drill down. Any ideas???

Thank you.

molendijk
06-04-2009, 07:37 PM
In the head of all your pages except the one that contains the menu:
<link rel="stylesheet" type="text/css" href="jqueryslidemenu.css" />

<!--[if lte IE 7]>
<style type="text/css">
html .jqueryslidemenu{height: 1%;} /*Holly Hack for IE7 and below*/
</style>
<![endif]-->

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<script type="text/javascript" src="jqueryslidemenu.js"></script>

<script type="text/javascript">
AjaxInclude = function (url) {
if (window.XMLHttpRequest) {Ajax=new XMLHttpRequest();}
else {Ajax=new ActiveXObject("Microsoft.XMLHTTP");}
Ajax.open("GET",url,false);Ajax.send(null);
var newdiv = document.createElement("span");
newdiv.innerHTML = Ajax.responseText;
var container = document.getElementById("container");
container.appendChild(newdiv);
}
</script>

In the body of all your pages except the one that contains the menu:
<div id="container"></div>
<script type="text/javascript">AjaxInclude("menu.html")</script>
where menu.html is supposed to contain your menu.
===
Arie Molendijk.