PicnicTutorials Posted April 20, 2009 Report Share Posted April 20, 2009 Good morning, Is there a simple way to change this script so it uses classes, or directly targets the li, for the hover delay? That is, rather than having the mouseover and onmouseout events in the html? So that would be unobtrusive right? http://javascript-array.com/scripts/simple_drop_down_menu/ Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted April 21, 2009 Author Report Share Posted April 21, 2009 (edited) Aren't there any JS'ers around here anymore? Put on hold what I asked in the first post. First I need to just get the thing working. I messed with it for some time but was unable. Everything is there on that page (above link). You can do a source code copy and paste and the demo menu still holds the drop down in place on mouseout. Although, I need mouseover and mouseout delay. I'm want to put it into my mega menu. http://www.visibilityinherit.com/projects/mega-drop-down.php but as usual, I fall on the JS (thats getting old!). Thanks! Edited April 21, 2009 by Eric Quote Link to comment Share on other sites More sharing options...
LSW Posted April 21, 2009 Report Share Posted April 21, 2009 You know, IMHO, JS is the freshest best language ever created and you should use it for everything, especially rollovers, nothing does it better! *snicker* just thought I would see if you still read anything I write ref. to JS. Or if you just ignore them knowing how I feel about JS and JS Rollovers Bummer I missed April first for this. Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted April 21, 2009 Author Report Share Posted April 21, 2009 Well... I only use JS for the iceing on the cake. In which cases, it's the best language there is. To bad I suck at it! That reminds me of - "Hulk, strongest there is!" Hulk vs Wolverine cartoon - it was awesome! Quote Link to comment Share on other sites More sharing options...
LSW Posted April 21, 2009 Report Share Posted April 21, 2009 LOL - Sorry Wolverine fan here. Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted April 21, 2009 Author Report Share Posted April 21, 2009 LOL - Sorry Wolverine fan here. Me too! Thats just what The Hulk was saying while he was smashing Wolverines' head 5 feet into the ground. Of course he quickly recovered! Ultamately, wolverine was going to win (Hulk was getting tired), but then the bad mutants tranked them... Quote Link to comment Share on other sites More sharing options...
LSW Posted April 22, 2009 Report Share Posted April 22, 2009 Bad Mutants never play fair! Quote Link to comment Share on other sites More sharing options...
jlhaslip Posted April 22, 2009 Report Share Posted April 22, 2009 Eric, I hate to do this, but if you still require some assistance on this issue, I suggest that you post a Topic over at the w3schools site. There are some pretty fair js folks over there. In particular, Deidres_Dad and justsomeguy would be some good sources for js support on that Forum. I really hate to guide you away from the Killersites Forum, but ... Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted April 22, 2009 Author Report Share Posted April 22, 2009 Cool - thanks! There's a couple of JS'ers around here that can do anything with it. They must be away. I'll try over there if I get stuck again. But now I found a nice jquery plugin that can do it, called hoverintent. I'll try my hand at that. Even I shouldn't be able to boch that up... Quote Link to comment Share on other sites More sharing options...
BeeDev Posted May 7, 2009 Report Share Posted May 7, 2009 Basic onmouseout delays can be achieved with setTimeout javascript. onmouseout="setTimeout(myFunction, 5000);" myFunction can add or remove the classes. 5000 means 5 second delay. But there's much much easier ways to achieve these things now using Javascript libraries such as jQuery or Prototype or MOOTools etc. You should head over to their websites and check them out. My personal favorite is jQuery for it's extensibility and it's simplicity! jQuery basically makes Javascript code human readable Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.