Skip to content

Instantly share code, notes, and snippets.

@eshiota
Created September 4, 2013 13:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eshiota/6437210 to your computer and use it in GitHub Desktop.
Save eshiota/6437210 to your computer and use it in GitHub Desktop.
Module("MYAPP.modules.MyModule", function (MyModule) {
MyModule.fn.initialize = function (el) {
this.element = $(el);
this.select = this.element.find("[data-foo-select]");
}
});
var mymodule = new MYAPP.modules.MyModule($("#mymodule"));
<div id="mymodule">
<select data-foo-select>
<option></option>
</select>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment