Comments for LDIR: LoaD_Increment_Repeat https://blog.peter-ryan.co.uk The (mostly techie) ramblings of Peter Ryan. Tue, 26 May 2009 16:39:36 +0000 hourly 1 http://wordpress.org/?v=3.8.1 Comment on Suckerfish menus with hide delay by jonny https://blog.peter-ryan.co.uk/2007/12/08/suckerfish-menus-with-hide-delay/comment-page-1/#comment-969 Tue, 26 May 2009 16:39:36 +0000 https://blog.peter-ryan.co.uk/2007/12/08/test-post/#comment-969 Anyone know how to make a 2 second delay before the first drop down appears on hover?

]]>
Comment on Using CSS3 :target selectors by Abas com CSS utilizando :target » CSS no Lanche https://blog.peter-ryan.co.uk/2008/03/14/using-css3-target-selectors/comment-page-1/#comment-919 Mon, 04 May 2009 11:18:42 +0000 https://blog.peter-ryan.co.uk/2008/03/14/using-css3-target-selectors/#comment-919 [...] verão que foi utilizado um arquivo JavaScript chamado: csstarget.js, um script desenvolvido por Peter Ryan que faz com que o seletor :target funcione em todos os browsers que não suportam esse seletor [...]

]]>
Comment on Suckerfish menus with hide delay by Tim https://blog.peter-ryan.co.uk/2007/12/08/suckerfish-menus-with-hide-delay/comment-page-1/#comment-698 Thu, 22 Jan 2009 14:15:48 +0000 https://blog.peter-ryan.co.uk/2007/12/08/test-post/#comment-698 Hahaha. Very good point. I guess I should feel lucky you even reponded, but it’s much appreciated.

Thanks Peter!

]]>
Comment on Suckerfish menus with hide delay by Peter Ryan https://blog.peter-ryan.co.uk/2007/12/08/suckerfish-menus-with-hide-delay/comment-page-1/#comment-697 Thu, 22 Jan 2009 10:55:25 +0000 https://blog.peter-ryan.co.uk/2007/12/08/test-post/#comment-697 Hi Tim,

Are you saying you’re using a different script from the one here? And you want support? For a script I can’t see or know the name of? ;)

Okay… the issue above was because the sf-delay script adds CSS class names to the DOM on all browsers, whereas the original sfhover function only did anything when the browser was IE. The problem is, Firefox (and possibly other browsers) as opposed to IE, will return to the same DOM when you press the back button… so the CSS class names show made the menu visible are still in place. But the JavaScript events that should’ve removed those CSS class names after the delay, have been lost.

So the fix was to force the function that removed the CSS class names to execute when the page unloads. So when the user selects a menu item, the DOM is returned to its original state before the new page is loaded.

Hope that helps some! :D

Peter.

]]>
Comment on Suckerfish menus with hide delay by Tim https://blog.peter-ryan.co.uk/2007/12/08/suckerfish-menus-with-hide-delay/comment-page-1/#comment-694 Wed, 21 Jan 2009 18:41:01 +0000 https://blog.peter-ryan.co.uk/2007/12/08/test-post/#comment-694 How’s it going. I’m using a slightly different superfish script. I am having the same problem as “carry” in a previous post where everytime I hit the back button the menu along with the sub is present. I don’t have an actual sfHover function within my code. Any insight?

Thanks.

]]>
Comment on Suckerfish menus with hide delay by Peter Ryan https://blog.peter-ryan.co.uk/2007/12/08/suckerfish-menus-with-hide-delay/comment-page-1/#comment-650 Sat, 03 Jan 2009 02:53:34 +0000 https://blog.peter-ryan.co.uk/2007/12/08/test-post/#comment-650 Hi Ryan,

If you find the line that sets the sfEls line and comment it out, like so:

// var sfEls = document.getElementById("nav").getElementsByTagName("li");

and then add these lines in below it:

var sfEls = [], elems, i;

elems = document.getElementById("nav").getElementsByTagName("li");
for (i=0; i<elems.length; i++) sfEls = sfEls.concat(elems[i]);

elems = document.getElementById("nav2").getElementsByTagName("li");
for (i=0; i<elems.length; i++) sfEls = sfEls.concat(elems[i]);

then that should work! This of course assumes your IDs are “nav” and “nav2″, but those are easily changed. If you have more menus then just copy and past those two lines and change the ID as appropriate.

I’ve tested this only in Firefox…. so you might want to check it on other browsers before rolling it out! But it should work fine. ;)

Hope that helps.

]]>
Comment on Suckerfish menus with hide delay by Ryan https://blog.peter-ryan.co.uk/2007/12/08/suckerfish-menus-with-hide-delay/comment-page-1/#comment-647 Fri, 02 Jan 2009 07:31:25 +0000 https://blog.peter-ryan.co.uk/2007/12/08/test-post/#comment-647 Thanks for the great script.

Do you have any idea how to get it working with multiple menus with different ID’s on the same page?

]]>
Comment on Suckerfish menus with hide delay by max mcdowell https://blog.peter-ryan.co.uk/2007/12/08/suckerfish-menus-with-hide-delay/comment-page-1/#comment-628 Wed, 24 Dec 2008 13:44:39 +0000 https://blog.peter-ryan.co.uk/2007/12/08/test-post/#comment-628 Thank you Peter,

It works perfectly, including for-firefox modification, even though I know no javascript and can only cut and paste it.
My three level menu is now calm and usable.

Max

]]>
Comment on Suckerfish menus with hide delay by Peter Ryan https://blog.peter-ryan.co.uk/2007/12/08/suckerfish-menus-with-hide-delay/comment-page-1/#comment-504 Tue, 11 Nov 2008 19:55:03 +0000 https://blog.peter-ryan.co.uk/2007/12/08/test-post/#comment-504 Hi Bill,

It should do… but I’m not familiar with Joomla myself or it’s suckerfish implementation. You might need to change the cssClass from “sfhover” to something else, and you’ll need to remove the existing suckerfish JavaScript, but otherwise, this should be a drop in replacement.

You might want to take account of the comments above to fix a problem with menus remaining open when the user presses the back-button on their browser…. at some point, when I get some free time, I *will* re-work this code!!

Peter.

]]>
Comment on Suckerfish menus with hide delay by Bill https://blog.peter-ryan.co.uk/2007/12/08/suckerfish-menus-with-hide-delay/comment-page-1/#comment-503 Tue, 11 Nov 2008 13:15:22 +0000 https://blog.peter-ryan.co.uk/2007/12/08/test-post/#comment-503 Thanks very much for this. Newb question: Is it possible to drop this into the suckerfish solution I am using in Joomla?

]]>