78
rated 0 times
[
82]
[
4]
/ answers: 1 / hits: 19493
/ 12 Years ago, wed, march 14, 2012, 12:00:00
I've seen various examples come close to what I am looking for, but none of it seems to describe it how I exactly want it. I am a beginner to jQuery, so explanations welcome.
I'm looking for this to toggle the innerHTML
from -
to +
. Anyone know of a way to do this, efficiently?
jQuery/JavaScript
$(document).ready(function() {
$(.A1).click(function() {
$(.P1).toggle(slow);
$(.A1).html(+);
});
});
HTML
<div class=A1>-</div>
<h2 class=H1>Stuff</h2>
<div class=P1>
Stuffy, Stuffy, Stuffed, Stuffen', Stuffing, Good Luck Stuff
</div>
Thank you, anything relating to switching the inside text of an HTML element shall help. =)
More From » jquery