shyam13 Posted July 19, 2012 Share Posted July 19, 2012 What would you use to create a dynamic navigation? Css or Jquery? as I heard that jquery is more suitable for dynamic navigations. Link to comment https://forums.phpfreaks.com/topic/265942-would-you-use-css-or-jquery-to-make-navigation-dynamic/ Share on other sites More sharing options...
KevinM1 Posted July 19, 2012 Share Posted July 19, 2012 What do you mean by 'dynamic'? Link to comment https://forums.phpfreaks.com/topic/265942-would-you-use-css-or-jquery-to-make-navigation-dynamic/#findComment-1362698 Share on other sites More sharing options...
DavidAM Posted July 19, 2012 Share Posted July 19, 2012 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 https://forums.phpfreaks.com/topic/265942-would-you-use-css-or-jquery-to-make-navigation-dynamic/#findComment-1362716 Share on other sites More sharing options...
shyam13 Posted July 19, 2012 Author Share Posted July 19, 2012 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 https://forums.phpfreaks.com/topic/265942-would-you-use-css-or-jquery-to-make-navigation-dynamic/#findComment-1362721 Share on other sites More sharing options...
scootstah Posted July 19, 2012 Share Posted July 19, 2012 If you are retrieving from a database you need to be using PHP, not Javascript. Link to comment https://forums.phpfreaks.com/topic/265942-would-you-use-css-or-jquery-to-make-navigation-dynamic/#findComment-1362722 Share on other sites More sharing options...
shyam13 Posted July 19, 2012 Author Share Posted July 19, 2012 Would I be able to use php to create a multi level navigation system? Thank You Link to comment https://forums.phpfreaks.com/topic/265942-would-you-use-css-or-jquery-to-make-navigation-dynamic/#findComment-1362726 Share on other sites More sharing options...
KevinM1 Posted July 19, 2012 Share Posted July 19, 2012 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 https://forums.phpfreaks.com/topic/265942-would-you-use-css-or-jquery-to-make-navigation-dynamic/#findComment-1362732 Share on other sites More sharing options...
shyam13 Posted July 19, 2012 Author Share Posted July 19, 2012 By using a database how would it be possible to create a multi level navigation system? Thank You Link to comment https://forums.phpfreaks.com/topic/265942-would-you-use-css-or-jquery-to-make-navigation-dynamic/#findComment-1362737 Share on other sites More sharing options...
KevinM1 Posted July 19, 2012 Share Posted July 19, 2012 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 https://forums.phpfreaks.com/topic/265942-would-you-use-css-or-jquery-to-make-navigation-dynamic/#findComment-1362753 Share on other sites More sharing options...
scootstah Posted July 19, 2012 Share Posted July 19, 2012 By using a database how would it be possible to create a multi level navigation system? Thank You http://www.sitepoint.com/hierarchical-data-database/ http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/ Link to comment https://forums.phpfreaks.com/topic/265942-would-you-use-css-or-jquery-to-make-navigation-dynamic/#findComment-1362818 Share on other sites More sharing options...
shyam13 Posted July 20, 2012 Author Share Posted July 20, 2012 Thank You Link to comment https://forums.phpfreaks.com/topic/265942-would-you-use-css-or-jquery-to-make-navigation-dynamic/#findComment-1362988 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.