I'm trying to show/hide multiple div
s with classnames based on proximity to the anchor which triggers the JQuery. I think something is wrong with how I'm referencing the div which I want to show.
I have a Fiddle here: http://jsfiddle.net/lizfulghum/qKMH8/4/ and I'm assuming the issue is with this line: JQuery(this).next(".full").show();
The complete code is as follows:
HTML
<div class="teaser">
Blah blah blah
<a href="#" class="toggle">Toggle</a>
</div>
<div class="full">
Full Text Goes Here
</div>
<div class="teaser">
Blah blah blah
<a href="#" class="toggle">Toggle</a>
</div>
<div class="full">
Full Text 2 Goes Here
</div>
Javascript
jQuery(document).ready(function() {
jQuery(".full").hide();
jQuery(".toggle").click(function() {
JQuery(".full").hide();
JQuery(this).next(".full").show();
});
});
Could anyone enlighten me on this point?