Hi,
hey it is intresting i thought….
Yeah, don’t do it, really. Instead of
$(‘p.hello’).css (‘color’, ‘#000000′);
$(‘p.hello’).text (‘hello’);
$(‘p.hello’).addClass (‘paragraph’);
$(‘p.hello’).fadeTo (1000, 1);
go with
var $p = $(‘p.hello’);
$p.css (‘color’, ‘#000000′);
$p.text (‘hello’);
$p.addClass (‘paragraph’);
$p.fadeTo (1000, 1);
This will cache the variable and keep it ready for quick reuse.
hey it is intresting i thought….
Yeah, don’t do it, really. Instead of
$(‘p.hello’).css (‘color’, ‘#000000′);
$(‘p.hello’).text (‘hello’);
$(‘p.hello’).addClass (‘paragraph’);
$(‘p.hello’).fadeTo (1000, 1);
go with
var $p = $(‘p.hello’);
$p.css (‘color’, ‘#000000′);
$p.text (‘hello’);
$p.addClass (‘paragraph’);
$p.fadeTo (1000, 1);
This will cache the variable and keep it ready for quick reuse.
No comments:
Post a Comment