Explaining jQuery dialogs in the Nemikor Blog, Scott González uses the .each() method on an id selector:
$('#page-help').each(function() {
var dialog = $('<div></div>')
.load($(this).attr('href'))
.dialog( ... );
$(this).click(function() { ... });
});
Since an id selector can only return a single element, what is the purpose of using the .each() method? (which is normally for iterating over matched elements).
Is it just that there is no simpler way to execute a function for the 'page-help' element which provides access to $(this)?