0

I want to add functions/methods to certain elements but instead of select all or just those with classes I want to select them in the template within a script tag.

I've seen many plugins that do these but I can't think of a way to create such functions/methods.

What I mean is like this $('#select').selectize({})

I would only need to know how to pass the element to the function/method. I've tried searching for it but I have no clue what to search for. The best I've came up with was like this

template: upload($(element), {}) js: function upload(object, settings) {}

Unfortunately since I have no idea what this is called I can't really create a proper title for this question

Kazuto
  • 158
  • 2
  • 15

0 Answers0