/ Published in: JavaScript
                    
                                        
Use chaining in jQuery to reduce the code size and gain better performance.
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
var $active_light = $('#traffic_light input.on');
$active_light.bind('click', function(){...})
.css('border', '3px dashed yellow')
.css('background-color', 'orange')
.fadeIn('slow');
URL: http://www.artzstudio.com/2009/04/jquery-performance-rules/
Comments
 Subscribe to comments
                    Subscribe to comments
                
                