The end()
function in jQuery reverts the element set back to what it was before the last destructive change, so I can see how it's supposed to be used, but I've seen some code examples, eg: on alistapart (which were probably from older versions of jQuery - the article is from 2006) which finished every statement off with .end()
. eg:
$( 'form.cmxform' ).hide().end();
- Does this have any effect?
- Is it something I should also be doing?
- What does the above code even return?