Using jquery: How to change only a certain character using jquery on newest questions tagged jquery – Stack Overflow
I need to change the + to – when toggled. The code is set up at
http://jsfiddle.net/B65Ht/
HTML
<a class="expandB" href="#">
<h3>Advocacy + </h3>
</a>
<div class="content">
Content goes here
</div>
jQuery
$(document).ready(function(){
$('.content').hide();
$("a.expandB").click(function() {
$(this).toggleClass("expandB").next().slideToggle("slow", function(){
// script to toggle between + and -
});
return false; //Prevent the browser jump to the link anchor/Prevent the browser jump to the link anchor
});
});
See Answers
source: http://stackoverflow.com/questions/11365064/how-to-change-only-a-certain-character-using-jquery
Using jquery: using-jquery
Recent Comments