My mindset on how to use and develop in jQuery has just changed dramatically. I watched Yehuda Katz's video on Evented Programming. Basically the idea he presents boils down to asking:
- If this was natively supported, what would it look like?
- Then writing the code to get the functionality you want, based on that.
- Then write the code to implement the "browser code"
Amazing. This creates very reusable code and simplifies the code you do write.
I came across this video from Dan Webb's article on data-* attributes. It is also a great article and helps remember that we should try to keep the html as semantic as possible.
Great resources to checkout.