SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot gidday's Avatar
    Join Date
    Jan 2007
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Son of Suckerfish help

    Hi Folks

    Could someone be kind enough to make a change to the http://htmldog.com Son of Suckerfish javascript for me. I would like it to have a delay on the flyout so they are 'sticky' for a moment or 2. Here is the javascript:

    Code:
    <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>
    Thanks

    Joe

  2. #2
    SitePoint Enthusiast FSan's Avatar
    Join Date
    Dec 2005
    Location
    San Martin de los Andes, Patagonia Argentina
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One of the points of the suckerfish dropdown menues is having a pure css dropdown.
    That piece of javascript is just meant to overcome the fact that some browsers (ie 6...) do not accept the pseudo-class :hover on elements other than a, which is what sf uses to show/hide the dropdown. This js just adds/removes a class.
    To accomplish what you want y need a very different script.
    Check out jquery.com. You can use some of the built-in effects, menu plugin or just write your own together with the easing plugin.
    Good luck


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •