ahhh.. very good
question:
i am very curious how you would:
1) append a paragraph
2) pause 3 seconds
3) and then remove the paragraph from the DOM without any effect.
all in one line of code?
Klaus Hartl wrote:
>
>
>
> Tombo schrieb:
>> could you give a live example for us to ponder
>> i want to feel the love first hand :-)
>>
>>
>> Klaus Hartl wrote:
>>>
>>> $('<p><strong>No images
>>> found.</strong></p>').appendTo('#msg').pause(3000,
>>> 'fx').fadeOut('normal', function() { $(this).remove() } );
>
> This is taken from production... not yet live. The snippet itself is no
> rocket science, but what I meant: I create a paragraph with a message on
> the fly, put it somewhere into the DOM tree, wait 3 seconds, fade that
> paragraph out smoothly and then remove it from the DOM again - all in
> one line of code. With traditional javascript that would have taken 100
> lines probably... And besides, the code is readable like nothing else...
>
>
> -- Klaus
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>
--
View this message in context:
http://www.nabble.com/Why-I-love-jQuery...-tf2239042.html#a6214227
Sent from the JQuery forum at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/