You're very close. The .slideToggle() method will slide down if hidden
and up if visible:
$(document).ready(function(){
$(.firstLine).click(function(){
$(this).next().slideToggle('slow');
});
});
Working with your code the way you had it, you could have done
el.click(function(){
$(this).slideToggle('slow');
});
On Feb 24, 1:28 am, zephyr [EMAIL PROTECTED] wrote:
Hi,I cannot get my finger behind this one:
I have this HTML:
p class=firstLineThis is the first line of the first paragraph/p
pAnd here is some more text. Bladibladibla/p
p
Thanks Karl, this works. Very instructive - didn't know the syntax of
the is and ternary operator in jQuery. I'll check out learningjquery!
Marc
3 matches
Mail list logo