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.

Photo

A Dropdown menu


  • Please log in to reply
6 replies to this topic

#1 Wolfy87

Wolfy87

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:12:51 PM

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.

Edited by Wolfy87, 29 July 2009 - 10:02 AM.


BC AdBot (Login to Remove)

 


m

#2 Wolfy87

Wolfy87
  • Topic Starter

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:12:51 PM

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 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:06:51 AM

Posted 29 July 2009 - 05:35 PM

It is not a bug when you are not using their APIs correctly. :thumbsup:

#4 KamakaZ

KamakaZ

  • Members
  • 739 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Victoria
  • Local time:11:51 PM

Posted 29 July 2009 - 06:03 PM

Please elaborate Groovicus?

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 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:06:51 AM

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:

#6 KamakaZ

KamakaZ

  • Members
  • 739 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Victoria
  • Local time:11:51 PM

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...

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 Wolfy87

Wolfy87
  • Topic Starter

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:12:51 PM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users