Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
How do you make tabs using javascript?
Old 06-01-2008, 09:07 AM How do you make tabs using javascript?
Super Talker

Posts: 129
Trades: 1
Hi,
I want to make tabs to show different parts of videos. For example...

Part 1 Part 2 Part 3

Each part would be clickable and when clicked it should show a little video.

I have tried this using the css tutorial on some website but I make the tabs but nothing happens when you click on them. I think javascript would be much easier to handle this.

Another thing is that I am potentially going to use this method for creating loads of tabs (repeat proccess). So I don't want to make a new piece of code every time.

So can anyone give me any javascript to create tabs. (Obviously I can use css to style them, right?)

The code must be strictly javascript, css or html (PHP or any other scripting is supported by my host)

Thank You.
yourmediaking is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-01-2008, 12:53 PM Re: How do you make tabs using javascript?
upstarter's Avatar
Average Talker

Posts: 26
Name: Starr Horne
Trades: 0
You should consider using one of the many good JS libraries that provide tabs. I like ext-js. But jquery-ui will also have tabs, as will dojo, etc.

There's really no reason to do this yourself, when there's such a wealth of libraries available.
__________________
my company:
Please login or register to view this content. Registration is FREE


my blog:
Please login or register to view this content. Registration is FREE
upstarter is offline
Reply With Quote
View Public Profile Visit upstarter's homepage!
 
Old 06-01-2008, 01:32 PM Re: How do you make tabs using javascript?
Super Talker

Posts: 129
Trades: 1
thanks for the info but i really like the satisfaction of dong something myself (if possible).
yourmediaking is offline
Reply With Quote
View Public Profile
 
Old 06-02-2008, 01:26 AM Re: How do you make tabs using javascript?
vn5ltr's Avatar
Skilled Talker

Posts: 93
Location: Melbourne, Australia
Trades: 0
All you would need to do is write the markup in css and xhtml. Then, underneath the tabs, have a div layer which is the 'container' or area for the videos to load up. Assign the layer an ID like 'videoContainer' or something like that.

Finally, for each tab, you can assign an 'onclick' event that will run an ajax function to load up the specified video/content based on the parameter you pass it.
vn5ltr is offline
Reply With Quote
View Public Profile
 
Old 06-03-2008, 05:52 PM Re: How do you make tabs using javascript?
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Personally, although I do use the Jquery library, I never use the tab libraries, as I prefer to build them myself. I have a few techniques and have gotten very fast at it. The first thing I do is put a class called "inviz" on every div that is an invisible tab. All "inviz" does is make the position absolute, and the left -9999px; By removing the class on one item at a time, the div will instantly snap back, and there will be no flicker, if there are images in it, as it has been positioned off screen, which allows it to preload.

I also build my own modal popups (lightbox style). I know, I am weird.
__________________
Join me on
Please login or register to view this content. Registration is FREE

Last edited by wayfarer07; 06-03-2008 at 05:53 PM..
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 06-04-2008, 08:07 AM Re: How do you make tabs using javascript?
Super Talker

Posts: 129
Trades: 1
thanks but can you show me an example?
__________________

Please login or register to view this content. Registration is FREE
yourmediaking is offline
Reply With Quote
View Public Profile
 
Old 06-04-2008, 11:43 PM Re: How do you make tabs using javascript?
VirtuosiMedia's Avatar
Web Design Made Simple

Posts: 1,228
Trades: 0
Here are 33 different tab scripts. You should be able to find one you can use.
VirtuosiMedia is offline
Reply With Quote
View Public Profile Visit VirtuosiMedia's homepage!
 
Old 06-05-2008, 12:45 PM Re: How do you make tabs using javascript?
Super Talker

Posts: 129
Trades: 1
thank you so much, virtuosimedia, that will do!
__________________

Please login or register to view this content. Registration is FREE
yourmediaking is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How do you make tabs using javascript?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.27255 seconds with 12 queries