navigation - Dynamic Nav-pills to show Tab-content in Bootstrap -


I have makes dynamic navigation are functions that a Web page I have a problem when I top nav Clicking on the buttons then it works. This is the problem as I know that you can use the ID only once.

Thanks in advance, how can I use classes instead of ID to make sure? Any questions, just comment and I will answer in a moment.

code:

  Function Print Comments ($ Connections) {foreach ($ amb as $ key = & Gt; $ a) {& lt; Ul class = "amb_tool nav nav-bullets list-inline amb_tool_pill" & gt; & Lt; Li & gt; & Lt; Data-toggle = "tablet" href = "# amb_info" & gt; & Lt; Span class = "glyphicon glyphicon-info-sign" & gt; & Lt; / Span & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; Data-Toggle = "Tablet" href = "#_Mb_Iim" & gt; & Lt; Span class = "glyphicon glyphicon-comment" & gt; & Lt; / Span & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; Div class = "tab-content" & gt; & Lt; Div id = "amb_info" class = "tab-panel" & gt; & Lt; Div class = "well well-sm amb-well" & gt; {$ A ['amb_about']} & lt; / Div & gt; & Lt; / Div & gt; & Lt; Div id = "amb_comm" class = "tab-panel" & gt; & Lt; Div class = "well well-sm amb-well" & gt; Html; $ Html = Output Commands ($ a ['comments']); $ Html = & Lt; & Lt; & Lt; HTML & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; }}    

I have all tabs script used in 15+ years, id tab Of the tab-panel (or equivalent) matches an ID, and otherwise how will it know which one to open? You can use classes with bootstrap, but if the classes are not unique, then each other will trigger and vice versa. See examples: IDs can also be used.

  & lt ;! - New tab with squares - & gt; & Lt; Ul class = "nav nav-tabs" role = "tablist" & gt; & Lt; Li class = "active" & gt; & Lt; A href = ".home" role = "tab" data-toggle = "tab" & gt; Home & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = ".profile" role = "tab" data-toggle = "tab" & gt; Profile & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = ".message" role = "tab" data-toggle = "tab" & gt; Message & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = ".settings" role = "tab" data-toggle = "tab" & gt; Settings & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt ;! - Tab pans with classes - & gt; & Lt; Div class = "tab-content" & gt; & Lt; Div class = "tab-panel active home" & gt; Home & lt; / Div & gt; & Lt; Div class = "tab-panel profile" & gt; Profile & lt; / Div & gt; & Lt; Div class = "tab-pen message" & gt; Message & lt; / Div & gt; & Lt; Div class = "tab-panel settings" & gt; Settings & lt; / Div & gt; & Lt; / Div & gt;    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -