I have a "for" function performed in a jQuery draggable function. Is there a better way to do this from the execution time perspective? My function is:
$("#dragger").draggable({
containment: '#timeline',
axis: 'x',
drag: function(event, ui) {
var divs = $("#timeline div.timeline");
for (var i=0, il=divs.length; i<il; i++) {
var layer = '#layer'+i,
gow = layer+"Go";
SelectClosestKeyframes(this, event, ui, $(layer), $(gow));
}
}
});
Can I improve the for (var i=0, il=divs.length; i<il; i++)
Thanx