I decided to try my hand at implementing jQuery from scratch as a way to learn vanilla JS. However, through this exercise, I gained a much greater appreciation for jQuery now that I realize how much it really does for you!
addClass
removeClass
toggleClass
hasClass
is
html
/empty
first
eq
find
filter
parent
/children
closest
append
remove
attr
data
css
on
- event delegation!
extend
(dollabill.js)ajax
(ajax.js)
- Allow for event namespacing
- Ideally, when appending, allow original reference to dollabill object to persist on the page somewhere
- Events#off - best way to handle turning off delegated events?
- Better organize event handlers
- #is to take chain selectors (ex.
#main.group
) - #is to take
:checked
- Read bracket selectors (ex.
li[data-id=1]
)