Is it recommended that, when I need to access the result of a jQuery selector more than once in the scope of a function, that I run the selector once and assign it to a loca
Another option here is to use an each instead of repeating the selector, and it's associated work, time and time again
var execute = function(){
$('.myElement').each(function() {
var elem = $(this);
elem.css('color','green');
elem.attr('title','My Element');
elem.click(function(){
console.log('clicked');
});
});
}