Make first link active Javascript -
I have this javascript code, and I want to activate the first link (tab) so that when going to a website Be it active, as well as when the next tab / link is clicked, the first one (active tab / link) has to be transformed into a normal tab / link (inactive), and it is also done!
Here is Javascript:
& lt; Script type = "text / javascript" & gt; Function forumhome_tabs_switch (switch_id) {document.getElementById ('forumhome_tab_switch_saint'). InnerHTML = document.getElementById (switch_id). WinnerHTML; } & Lt; / Script & gt; And here is the HTML code:
& lt; Td style = "cursor: indicator;" Onclic = "javascript: forumhome_tabs_switch ('forum_tabs_forum [forum]'); return refund;" & Gt; & Lt; A href = "#" tabindex = "2" onclick = "javascript: forumhome_tabs_switch ('forum_tabs_ $ forum [forum]'); return back;" & Gt; $ Forum [title] & lt; / A & gt; & Lt; / TD & gt; Nothing like this:
& lt; Li & gt; & Lt; A href = "#" & gt; 1 & lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; 2 & lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; 3 & lt; / Li & gt; ... This can not be done with this. This is the reason why I need help to convert the above mentioned code 3 link into 3 tabs, so a section of each tab page Opens I just want to activate the first tab until the second tab is clicked.
P.D. Apart from this, I want to pass "one" (link) to "onclick" on javascript code. Is this possible?
I think what it means to you? If you want, I can continue it, there are essentially three "tabs" that change the state when the other is clicked. You can easily create it easily in a tab system with pages.
HTML
& lt; Class = "tab" id = "Tab1" & gt; Tab1 & lt; / A & gt; & Lt; One class = "tab" id = "tab2" & gt; Tab 2 & lt; / A & gt; & Lt; One class = "tab" id = "tab3" & gt; Tab 3 & lt; / A & gt; Click (function () {$ (". Tab") CSS ("background- Color "," blue "); $ (this). CSS (" background-color "," red ");});}); CSS
.tab {width: 40px; Height: 20px; Background color: blue; } # Tab 1 {background color: red; }
Comments
Post a Comment