0

Hi all, quick question about a website I am about to build. Basically, somewhere on the homepage, presumably quite far down closer to the footer I will have a div with two clickable tabs: when clicked they will show different content but the url of the page needs to stay the same (as opposed to the main proper navigation I supposed). This can be achieved only with javascript right?

4
Contributors
8
Replies
26
Views
4 Years
Discussion Span
Last Post by Violet_82
0

Just as an extra note... If the only options are javascript and CSS, I also agree that javascript is the only option regarding a click event. However, this can also be achieved server side. For example, this is quite easy to implement without javascript in asp.net using panels. The downside of not using javascript is the postback.

0

css, perhaps the same structure as a css menu, no requirement for javascript
use button div instead of .menu ul , set the styles to dispplay or not display

Edited by almostbob

0

thanks JorgeM, but I will probably stick to javascript, I don't develop in asp.net so I dont' feel confident with it.
@almostbob, that way I won't be able to add any effect though

0

The effects available in css menus, include slide flyout fade z-index layers, and work when javascript is disabled, and on devices without javascript ability,
(recent convert)
no longer require javascript on 7 sites, last one is being converted

edit: as bad as a born-again non-smoker, I do it so everyone else must

Edited by almostbob

0

but I will probably stick to javascript, I don't develop in asp.net so I dont' feel confident with it.

Ahh.. so either you looked up panels are you are at least familiar with the concept in asp.net... In any case, there are other methods using other scripting languages. I only mentioned the server-side stuff because you mentioned the word "only" in your post. client-side is not the only way to do it, but doing this client side with javascript/jQuery significantly enhances the experience for your user.

This can be achieved only with javascript right?

Do you need more help with this or did it solve your question/issue?

0

Thanks JorgeM, yes, since I mentioned "only" it was good to know all the options : -)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.