Kristiinatrix
New Member
I want to design a tabbed menu for my website, but I don't know javascript. I found a code example that I liked and I'm still trying to figure it out.
Found it here:http://www.elated.com/res/File/articles/development/javascript/document-object-model/javascript-tabs/javascript-tabs.html
One thing that surprised me is that all of the website content is placed in one html file and javascript is used to hide or show the correct page content. During my research I saw this elsewhere as well but isn't that a really bad idea? I mean, what it the viewer doesn't have javascript enabled? They would just see the entire page content as one long page.
But if I use seperate html files, what good is javascript in tabs?
I could probably create the hover effects with css and I could make a class called "active" and use it for the active tab and bring it in front with z-index.
So, I have two questions:
Is it a good or a bad idea to place the entire website in one html file and hide the extra data with javascript?
Why use javascript at all if I make seperate html files for each tab?
Found it here:http://www.elated.com/res/File/articles/development/javascript/document-object-model/javascript-tabs/javascript-tabs.html
One thing that surprised me is that all of the website content is placed in one html file and javascript is used to hide or show the correct page content. During my research I saw this elsewhere as well but isn't that a really bad idea? I mean, what it the viewer doesn't have javascript enabled? They would just see the entire page content as one long page.
But if I use seperate html files, what good is javascript in tabs?
So, I have two questions:
Is it a good or a bad idea to place the entire website in one html file and hide the extra data with javascript?
Why use javascript at all if I make seperate html files for each tab?