user1278496
user1278496

Reputation: 1066

Displaying information depending on hyperlink selection - tabs

I have noticed that a lot of websites display product information in special tabs such as description, specification, delivery etc.

Does anybody know what this is called and what language I can use to develop it? See picture for a demonstration of what I mean.

enter image description here

Thanks

Upvotes: 0

Views: 75

Answers (2)

Lazerblade
Lazerblade

Reputation: 1127

Preload the tab information in hidden divs, show only the first div on page load, and onclick, change the tab to show which was clicked / selected, unhide the corresponding div, and hide the originally shown div. jQuery UI will work, but for something so simple, no need to add so many lines of code to your existing structure, unless you're going to be using it often and on multiple pages. I've found that most libraries include functionality that seldom if ever gets used, so I tend to write my own simplified functions.

Upvotes: 1

WolvDev
WolvDev

Reputation: 3226

You can use jQuery.UI for this. It's called tabs :)

http://jqueryui.com/demos/tabs/

Upvotes: 1

Related Questions