Is there any way to do something like this to avoid having to do .each or a for loop?
$('.backstretch-frame').backstretch( function(){ return $(this).data('img'); } );
Basically trying to pull the contents of the attribute for that particular object in the collection for instantiation.
imgdata attribute of each.backstrecth-frame?backstretch()to all instances of.backstretch-frameusing an inline getter instead of having to set up a for loop or using jQuery's.each()functionality..datacan only return one value for one element. Why don't you want to use.each? This is exactly the sort of thing you need it for.backstretch? Why don't you want to use a loop? There's nothing wrong with.each; jQuery uses it internally when you do something like$('.multi').attr('abc', 123);!