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
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)
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)
7,800 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
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