My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
How do you structure your jQuery file?

How do you structure your jQuery file?

Robert van der Elst's photo
Robert van der Elst
·Jan 12, 2016

Javascript is not my core work, but I do want to structure my jQuery file properly. For now, I've got some functions and loose jQuery, but nothing really OO ;) Mind you, I'm mostly manipulating the DOM, like adding and removing classes and inserting HTML. Nothing fancy really.

Just wondering how you people structure these things. Maybe some good articles somewhere on this?

Oh, I am using JSLint though, and that helps a bit with consistency, but it doesn't care about how I structure it all. ;)

Just to show you what I mean by simple jQuery, see this Codepen: codepen.io/robertvanderelst/pen/xZrjRq