Sign in
Log inSign up
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

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct