Professor GIBS Posted September 19, 2014 Share Posted September 19, 2014 (edited) Okay so I have a navigational bar: <nav> <ul id="navigation"> <li><a href="..homeindex.php" id="firstNav">Home</a></li> <li><a href="..forumsforums.php">Forums</a></li> <li><a href="..programprogram.php">Program</a></li> <li><a href="#">Development Teams ▾</a> <ul> <li><a href="..teamsmaingraphic.php">Graphic Design</a></li> <li><a href="..teamsmaingame.php">Game Design</a></li> <li><a href="..teamsmainweb.php">Web Design</a></li> <li><a href="..teamsmainapp.php">App Design</a></li> <li id="special_hover"><a href="#">Special »</a> <ul id="special"> <li><a href="..teamsspecialtechnology.php">Technology Era</a></li> <li><a href="..teamsspeciallanguages.php">Languages</a></li> <li><a href="..teamsspecialcomputers.php">Computers</a></li> <li><a href="..teamsspecialphones.php">Phones</a></li> </ul> </li> </ul> </li> <li><a href="#">Store ▾</a> <ul id="store"> <li><a href="..storeproductstemplates.php">Website Templates</a></li> <li><a href="..storeproductsgames.php">Pre-Order Games</a></li> <li><a href="..storeproductstechEra.php">Technology Era</a></li> <li><a href="..storeproductsapplications.php">Applications</a></li> </ul> </li> <li><a href="..contactcontact.php">Contact</a></li> <li><a href="..chatchat.php">Chat</a></li> <li><a href="..FAQFAQ.php" id="FAQ">FAQ</a></li> </ul></nav> You can tell my "Development Teams", and "Store" both are linked to '#'. This is because it's pretty annoying to click on then, and be directed to a page you didn't mean to go to(since their drop down lists). I was wondering if it was possible WITHOUT JavaScript, to make it link to a certain page on double click or if clicked within a certain time frame? Thanks in advanced! Edited September 19, 2014 by Professor GIBS Link to comment Share on other sites More sharing options...
Ingolme Posted September 19, 2014 Share Posted September 19, 2014 Don't make them hyperlinks. Just remove the <a href="#">. Link to comment Share on other sites More sharing options...
Professor GIBS Posted September 19, 2014 Author Share Posted September 19, 2014 No no, I want them to be links though. Like for example the store, I want it go to a page that displays items from all stores, instead of being specific. But, I want it to go to that page, on the second click.. Am I making since? Link to comment Share on other sites More sharing options...
dsonesuk Posted September 19, 2014 Share Posted September 19, 2014 Without JavaScript, very much doubt it, events like click, dblclick only picked up with javascript, but wait! http://css-tricks.com/examples/CSSDoubleClick/ good luck with this Link to comment Share on other sites More sharing options...
Professor GIBS Posted September 19, 2014 Author Share Posted September 19, 2014 Okay, I see.. Thank you, I looked over it, though it seems to be a little unstable. So I figured I would use JavaScript, and this is my code: <script type="text/javascript" src="home.js"></script> $("#teams").dblclick(function() { document.write("The paragraph was double-clicked.");}); But it doesn't work, and I tried it without the "#". Link to comment Share on other sites More sharing options...
dsonesuk Posted September 19, 2014 Share Posted September 19, 2014 (edited) 1) Since you are using jquery, are you linking to jquery library files.2) are you targeting the correct element2a) are you targeting the element AFTER the page has fully loaded.3) don't use document.writeEDIT: 2a Edited September 19, 2014 by dsonesuk Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now