I have a list of dynamically generated links using dynacloud.js in this form:
<a href="#description1"><span>description 1</span></a>
<a href="#description2"><span>description 2</span></a>
<a href="#description3"><span>description 3</span></a>
Which are generated from a list of bootstrap type spans in this form:
<span class="label label-default">description 1</span>
<span class="label label-default">description 2</span>
<span class="label label-default">description 3</span>
The spans are contained within a div that is hidden.
<div class="body_accordion" style="display: none;"> ..content.. </div>
What would be a javascript or jQuery method that would allow me to click on a link and have all corresponding hidden divs where link description = span description toggled to visible?
why is this question so offensive? :)
Let me reiterate: I wish to locate a span based on its content. Not ID or class The other functionality requested is not so important. Thanks.