JQuery accordion - targeting only header anchors -


i’ve created jquery accordion using generator - http://code.anotherwebstorm.com/apps/awsaccordion/

however, there links within content areas of accordion tabs, , when these links clicked, tab automatically closes. need tab remain open when these content links clicked. when tab header clicked should tab close. creator of script no longer supports it, gave me idea of needs done, here:

“i think need core , change in order listen anchor tabs when clicking , not ones inside. i think key here https://github.com/anotherwebstorm/awsaccordion/blob/master/jquery.accordion.js#l55 in line.

all click events bound headlis if couple of conditionals , / or target header anchors should fix it. “

unfortunately, don’t know how implement has described. appreciated!

thank you

headlis = elem.children().children() 

this elements getting initialized; before click event binding happens on elements of array can remove elements array doing custom check

headlis = elem.children().children()   $headlis.each(function(){     if(your custom check link removed)     // remove element  }) 

check this fiddle example. please check comments


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -