Jump to content

Would you use Css or jquery to make navigation dynamic?


shyam13

Recommended Posts

As KevinM1 suggested, it depends on what you mean by "dynamic" and on how the navigation is supposed to work.

 

JQuery is Javascript, so you can not depend on it being on. Users can turn it off. If portions of your navigation are only going to be visible "dynamically", then using JS (or JQ) will prevent some users from seeing and using your site.

 

I would use CSS as much as possible and only depend on JS to enhance the experience for those that have it on. Or for things that cannot be done in CSS.

I have to create a dynamic navigation for my website and I was querying whether to use Jquery or CSS, I need to create a multi-level navigation using jquery by retriving the names of the menu names from a database.

 

Thank You

 

Like scootstah said, JavaScript isn't going to work.  Neither is CSS.

 

JavaScript runs in the user's browser.  CSS is just a way to format HTML, isn't even a programming language (contains no logic), and is also parsed by the browser.  In order to access a database, you need to use a server side language, like PHP, Python, Ruby, Perl, etc.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.