BleepingComputer.com: A Dropdown menu

Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

A Dropdown menu Finally got one to work

#1 User is offline   Wolfy87 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 414
  • Joined: 25-July 08
  • Gender:Male
  • Location:England

Posted 29 July 2009 - 09:40 AM

Hey all, I have spent the past month trying to create a dropdown menu, I have tryed CSS (Worked but not in IE), JavaScript which was close but a bit odd and I have finally submitted to the power of jQuery. Using jQuery (For those that don't know, jQuery is a library for JavaScript) I have acomplished it but with one bug, when you mouse off of the menu to an empty bit of space i.e. you move from the last menu item to compleatly off of the menu then it stays extended, other wise it is fine, I am working to fix this though.

You can use it if you want, it is pritty malleable the only thing you cant add with ease are the five across the top but the actual items inside are easy to add.

Enjoy my dropdown menu, you will also need this file, it is the jquery library so just put it in the same folder.

Thanks, Ollie.

This post has been edited by Wolfy87: 29 July 2009 - 10:02 AM


#2 User is offline   Wolfy87 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 414
  • Joined: 25-July 08
  • Gender:Male
  • Location:England

Posted 29 July 2009 - 10:01 AM

Wow that was quick, I have fixed the bug so now if you mouse off atall it will close, all done =] enjoy.

#3 User is offline   groovicus 

  • Hail Groovicus!
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 9,522
  • Joined: 05-June 04
  • Gender:Male
  • Location:Centerville, SD

Posted 29 July 2009 - 05:35 PM

It is not a bug when you are not using their APIs correctly. :thumbsup:
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens

#4 User is offline   KamakaZ 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 548
  • Joined: 26-August 08
  • Gender:Male
  • Location:Victoria

Posted 29 July 2009 - 06:03 PM

Please elaborate Groovicus?
If I am helping you and don't reply in 24 hours please send me a PM

There's no place like 127.0.0.1
There are 10 types of people in the world, those that can read binary, and those who can't.

#5 User is offline   groovicus 

  • Hail Groovicus!
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 9,522
  • Joined: 05-June 04
  • Gender:Male
  • Location:Centerville, SD

Posted 29 July 2009 - 06:27 PM

If the library is properly implemented, then everything works. I have not used jQuery as much, but I make extensive use of YUI. If you use their libraries properly, then they just work, ie, drop-down menus close back up on mouse-out. therefore, it is not a bug if one fails to use the API properly. That's all I meant. I don't consider something to be a bug if it is due to me misusing a library, or making stupid mistakes. I consider a bug to be when things do not work in a way that I expect even though all my code is technically correct.

The way I look at it, if I drive my car into a lake, it isn't a bug because it didn't float. Yeah, kind of a stupid example, I know. Of course, if it did float, I would probably crap tacks.... that would be an undocumented feature (the car floating, not me crapping tacks). :thumbsup:
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens

#6 User is offline   KamakaZ 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 548
  • Joined: 26-August 08
  • Gender:Male
  • Location:Victoria

Posted 29 July 2009 - 06:40 PM

HAHAHA!! i love your example! And i also agree with you in you perception of what IS and isn't a bug. I can't comment on if the library is being used properly as i haven't checked the code...
If I am helping you and don't reply in 24 hours please send me a PM

There's no place like 127.0.0.1
There are 10 types of people in the world, those that can read binary, and those who can't.

#7 User is offline   Wolfy87 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 414
  • Joined: 25-July 08
  • Gender:Male
  • Location:England

Posted 30 July 2009 - 08:16 AM

Yes, I see what you meen, oh well i have fixed it now, a bug in my head more than anything.

Thanks.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users