Drupal 5.1
php4
a simple phptemplate, all-css theme
i've installed the Suckerfish javascript to page.tpl.php
<script type="text/javascript"><!--//--><![CDATA[//><!--
sfHover = function() {
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
//--><!]]></script>
i've placed the dropdown menus in a block; easier to style that way.
i know the stylesheet is working because even on Win/IE6, the menus change color on hover (that'd be the )
the dropdown (fly-out, i guess, since this is a vertical menu) works on Firefox, Mac, etc
any reason why this would not be working? it seems other people have had no trouble getting Suckerfish working with Drupal.
my install is a multi-site, one Drupal install; that is, the files are at /sites/linn.testbcd.org/themes/ -- might that make any difference?
i added the javascript to a Bluemarine theme and it did not work either, so it's not my theme.
http://linn.testbcd.org
thanks!
Comments
css did not match javascript
i hadn't realized that the line
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
meant that the "nav" listed there needed to match my ul id. i changed the javascript to "ddnav" to match my css -- hey presto nonny! i have me a Suckerfish.
if there is a handbook relating to this, i'd be glad to update it. (i'll look later, but maybe someone has the node memorized....?)
Does it work in IE7 for you?
Does it work in IE7 for you? It's offset to the right for me
i need to add that fix, too
there's an additional bit of javascript for IE7, but i haven't had a chance to add that. frankly, my celebration dance lasted too long! (i have limited testing opportunities, since i work on a Mac with Firefox.) it should be simple enough; i may get the chance this weekend.
I ended up using the "Son of
I ended up using the "Son of Suckerfish" menu with some IE7 fixes applied, works great :D
Next is to spend a few hrs getting it to work with some nice mootools FX
Thanks!
Thank you very much for sharing your work!
You have helped me out enormously.
Cheers!
for me the fix was...
similar to what was said in the first post...
in my case in that line, "LI" needed to be "li"... the case seemed to matter to IE6... I had the menu working fine in IE7/FF/Opera...
didn't work for me
I have IE 6 and my drop down menu's only work on firefox and IE7 (on my desktop). I changed the "LI" to "li" and nothing different happened. I don't understand where to change the name for unordered list to match what the code is looking for.
didn't work for me
I have IE 6 and my drop down menu's only work on firefox and IE7 (on my desktop). I changed the "LI" to "li" and nothing different happened. I don't understand where to change the name for unordered list to match what the code is looking for.