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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Do some research on it.  Google "navigation hierarchy database" - you should get some decent results to get you on your way.  Suffice it to say, it's a bit more complicated than just having someone give you code to plug into a system.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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