Skip to content

Instantly share code, notes, and snippets.

@hunt3r
Created June 14, 2013 13:07
Show Gist options
  • Save hunt3r/5781684 to your computer and use it in GitHub Desktop.
Save hunt3r/5781684 to your computer and use it in GitHub Desktop.
Vick function
$("*[data-view]").each(function(i,obj) {
var $this = $(this);
var viewDataAttr = $this.data("view");
if (app.views[viewDataAttr] && typeof(app.views[viewDataAttr]) === "function") {
console.log("Found view: " + viewDataAttr);
views.push(new app.views[viewDataAttr]);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment