Posted By

jonkemp on 06/29/10


Tagged

javascript jquery


Versions (?)

jQuery Chaining


 / Published in: JavaScript
 

URL: http://www.artzstudio.com/2009/04/jquery-performance-rules/

Use chaining in jQuery to reduce the code size and gain better performance.

  1. var $active_light = $('#traffic_light input.on');
  2. $active_light.bind('click', function(){...})
  3. .css('border', '3px dashed yellow')
  4. .css('background-color', 'orange')
  5. .fadeIn('slow');

Report this snippet  

You need to login to post a comment.