url - Make link in javascript select tabbed content -


this secondary question 1 asked earlier week here:

linkable tabs in javascript

i've made below javascript work in terms of url linking - if add #tabs-1 end of url top section (jtscrollbar) of page centered, i'm struggling find way bottom content (the div id's "content_x") show also.

i think need trigger click event? i've tried has failed abysmally. ever help.

here code:

here how have set links:

<a href="javascript:tabswitch(1, 19, 'tab_', 'content_');" id="tab_1" >     <img src="image1.jpg" />     <h3 class="links">         link 1     </h3> </a>         

where '1' number of tab , '19' total number of tabs.

here content shows when 'tab' clicked:

<div id="content_1" class="content">     <div class="modalblurb">         <img src="img.jpg" />         <p class="blurb">             "lorem ipsum dum de darr"         </p>     </div>   </div> 

and here's function code:

function tabswitch(active, number, tab_prefix, content_prefix) {        (var i=1; < number+1; i++) {         document.getelementbyid(content_prefix+i).style.display = 'none';         document.getelementbyid(tab_prefix+i).classname = '';       }       document.getelementbyid(content_prefix+active).style.display = 'block';       document.getelementbyid(tab_prefix+active).classname = 'active';        }   


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -