So I've been stuck for the whole afternoon on this problem which I eventually solved. It turned out I was assigning el instead of $el.
What's the difference between the two and when should I use each of them?
So I've been stuck for the whole afternoon on this problem which I eventually solved. It turned out I was assigning el instead of $el.
What's the difference between the two and when should I use each of them?
Straight from the documentation,
$el
is:So,
$el
is a cached, jQuery (or Zepto) version ofel
. If you need to use any jQuery or Zepto methods onel
, you can simply use$el
instead of wrappingel
in$()
each time.