Blink and marquee!

Recently I’ve blogged about creating the a blink tag with jQuery, I’ve also blogged about making a marquee tag.
Well can we combine them? Sure we can! But with $.Deferred() there’s some more cool things we can do, like this:
$.when($(…


This content originally appeared on Posts on LINQ to Fail and was authored by Posts on LINQ to Fail

Recently I’ve blogged about creating the a blink tag with jQuery, I’ve also blogged about making a marquee tag. Well can we combine them? Sure we can! But with $.Deferred() there’s some more cool things we can do, like this: $.when($('h1').blink({ count: 5 }), $('h1').marquee({ count: 1 })) .done(function() { $('h1').css('color', '#f00'); }); Once both the plugins have completed the text will turn red. Without wanting to get too deep into how Deferred works (read the doco for that) the high-level view is that when all the methods that are passed into $.


This content originally appeared on Posts on LINQ to Fail and was authored by Posts on LINQ to Fail


Print Share Comment Cite Upload Translate
APA
Posts on LINQ to Fail | Sciencx (2023-03-24T02:18:48+00:00) » Blink and marquee!. Retrieved from https://www.scien.cx/2011/02/09/blink-and-marquee/.
MLA
" » Blink and marquee!." Posts on LINQ to Fail | Sciencx - Wednesday February 9, 2011, https://www.scien.cx/2011/02/09/blink-and-marquee/
HARVARD
Posts on LINQ to Fail | Sciencx Wednesday February 9, 2011 » Blink and marquee!., viewed 2023-03-24T02:18:48+00:00,<https://www.scien.cx/2011/02/09/blink-and-marquee/>
VANCOUVER
Posts on LINQ to Fail | Sciencx - » Blink and marquee!. [Internet]. [Accessed 2023-03-24T02:18:48+00:00]. Available from: https://www.scien.cx/2011/02/09/blink-and-marquee/
CHICAGO
" » Blink and marquee!." Posts on LINQ to Fail | Sciencx - Accessed 2023-03-24T02:18:48+00:00. https://www.scien.cx/2011/02/09/blink-and-marquee/
IEEE
" » Blink and marquee!." Posts on LINQ to Fail | Sciencx [Online]. Available: https://www.scien.cx/2011/02/09/blink-and-marquee/. [Accessed: 2023-03-24T02:18:48+00:00]
rf:citation
» Blink and marquee! | Posts on LINQ to Fail | Sciencx | https://www.scien.cx/2011/02/09/blink-and-marquee/ | 2023-03-24T02:18:48+00:00
https://github.com/addpipe/simple-recorderjs-demo