SyntaxFix
Write A Post
Hire A Developer
Questions
Even shorter variant is to use
$(()=>{ });
where $ stands for jQuery and ()=>{} is so called 'arrow function' that inherits this from the closure. (So that in this you'll probably have window instead of document.)
$
()=>{}
this
window
document