954,606 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Which one to use?

hi web enthusiast guys, which one is better to use for a web site drop down menu or vertical menu?
a menu code in pure css?
a menu code in css and javascript?
a menu code in pure javascript?
a menu code in jquery?

factors to be considered in choosing which one to use?
ofcourse, one factor to be considered is which one you're more familiar with. but let's say you're quite familiar with all those languages which one you'll prefer most? (i'm not saying i know all those languages but their are guys out there who know alls those coding)

thanks for your input.

cguan_77
Nearly a Posting Virtuoso
1,317 posts since Apr 2007
Reputation Points: 19
Solved Threads: 115
 

CSS and jquery. I think this is not in your list. But here you can stylish your menu with css and animated like tranparency fading effects of drop down with jquery and also give links or raise events with javascript.

rajarajan07
Nearly a Posting Virtuoso
1,447 posts since May 2008
Reputation Points: 167
Solved Threads: 239
 

i would say CSS and if you want extra stuff added to it to make it look a little more 'cool' then you should use jquery or java.

I strongly suggest to never use a pure jav menu as some people have java turned off and they won't be able to use the menu properly meaning they wont see the rest of your site.

MJ Pieterse
Junior Poster
145 posts since Mar 2009
Reputation Points: 13
Solved Threads: 18
 

Fancy, with JQuery would be perfect.
But you can make a very nice menu with css and javascript only too.

digital29
Junior Poster in Training
67 posts since Feb 2010
Reputation Points: 6
Solved Threads: 6
 

jquery = javascript. You could face the same problems if js turned off. Depends on the level of complexity you're looking for. Pure CSS menus used to be the holy grail, but they can be implemented now. However, you don't tend to get the nice animations like rolldown etc - they tend to be a bit 'abrupt'. jQuery, mootools and other 'frameworks' 'nice-ify' menus. I would imagine that Java would be a slight overkill for a menu system. You should look for a 'progressive enhancement' javascript solution that degrades nicely if js is turned off.

diafol
Rhod Gilbert Fan (ardav)
Moderator
7,800 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
 

hi guys, thanks for all the replies..

@ardav, so when the js is turned off the jquery will also be affected? Thanks.

cguan_77
Nearly a Posting Virtuoso
1,317 posts since Apr 2007
Reputation Points: 19
Solved Threads: 115
 
so when the js is turned off the jquery will also be affected?


Yes. I have to be honest, I tend to say to hell with it with my trivial websites - use js and be damned. Some handhelds/mobiles don't like certain javascript menus - play with them to find out. In this instance, you could have a different nav system via a handheld css file, e.g.

<link href="myhandheld.css" type="..." rel="..." rev="..." media="handheld" />
<link href="normal.css" type="..." rel="..." rev="..." media="screen" />

...

<ul id="jsnav">
...
</ul>
<ul id="staticnav">
...
</ul>


The normal.css file has a statement to hide the staticnav list and the myhandheld.css file has a statement to hide the jsnav list.

There are a million ways to skin a cat. This is just one of them - there are looaads of other ways.

diafol
Rhod Gilbert Fan (ardav)
Moderator
7,800 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
 

i would say CSS and if you want extra stuff added to it to make it look a little more 'cool' then you should use jquery or java.

I strongly suggest to never use a pure jav menu as some people have java turned off and they won't be able to use the menu properly meaning they wont see the rest of your site.


Never, ever, ever, use Java for a menu - it is total overkill. And when Java does an update and then your browser detects the menu was written in an older version, the user gets asked if they wish to continue - every single time a bit of Java runs!

Use CSS, with some Javascript to enhance it, as suggested by several others (and using Jquery makes the script very easy to write, and there are many good free examples you can borrow). But never use Java, it's a high end full-on programming language for making applications.

drjohn
Posting Pro in Training
448 posts since Mar 2010
Reputation Points: 76
Solved Threads: 80
 

Yes. I have to be honest, I tend to say to hell with it with my trivial websites - use js and be damned. Some handhelds/mobiles don't like certain javascript menus - play with them to find out. In this instance, you could have a different nav system via a handheld css file, e.g.

<link href="myhandheld.css" type="..." rel="..." rev="..." media="handheld" />
<link href="normal.css" type="..." rel="..." rev="..." media="screen" />

...

<ul id="jsnav">
...
</ul>
<ul id="staticnav">
...
</ul>

The normal.css file has a statement to hide the staticnav list and the myhandheld.css file has a statement to hide the jsnav list.

There are a million ways to skin a cat. This is just one of them - there are looaads of other ways.


hi ardav, yup i do agree nowadays it's not only computers that can be use to access internet, there are handhelds devices to browse the net also. So to make the site convenient to every user..then have to considered putting options on web coding
Thanks man! :)

cguan_77
Nearly a Posting Virtuoso
1,317 posts since Apr 2007
Reputation Points: 19
Solved Threads: 115
 

Never, ever, ever, use Java for a menu - it is total overkill. And when Java does an update and then your browser detects the menu was written in an older version, the user gets asked if they wish to continue - every single time a bit of Java runs!

Use CSS, with some Javascript to enhance it, as suggested by several others (and using Jquery makes the script very easy to write, and there are many good free examples you can borrow). But never use Java, it's a high end full-on programming language for making applications.


Thanks drjohn for your input :)

cguan_77
Nearly a Posting Virtuoso
1,317 posts since Apr 2007
Reputation Points: 19
Solved Threads: 115
 

Use drop down menu when you buy a costum made css dropdown script.Learn how to alter the scipt yourself and then you can understand the menu yourself.

benjamin127
Newbie Poster
8 posts since Jun 2010
Reputation Points: 8
Solved Threads: 1
 

Hello All
My suggestion is JQuery would be perfect.because you can make menu with css and javascript only too.lets try it..


Thanks

jwd.adodis
Light Poster
48 posts since May 2010
Reputation Points: 7
Solved Threads: 2
 

Jquery is a best for your site.

Mike_Slough
Newbie Poster
16 posts since Jun 2010
Reputation Points: 10
Solved Threads: 1
 

CSS and JQUERY.

xuqi
Newbie Poster
23 posts since Jan 2008
Reputation Points: 10
Solved Threads: 2
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: