JQuery change on click
I am trying to make a minus sign back into a plus sign after the user has closed the consumable text.
Here is the HTML code
<p class="textDropTitle"><span class="textDropLogo"></span>Title</p>
<div class="textDropSub"><p>This is my text Below</div>
<p class="textDropTitle"><span class="textDropLogo">+</span>Title</p>
<div class="textDropSub"><p>This is my text Below</div>
<p class="textDropTitle"><span class="textDropLogo">+</span>Title</p>
<div class="textDropSub"><p>This is my text Below</div>
JQuery
$(".textDropSub").hide();
$('.textDropLogo', this).text('+');
$(".textDropTitle").click(function() {
$(this).next().toggle('fast');
$('.textDropLogo', this).text('-');
});
+3
source to share