Skip to content

Instantly share code, notes, and snippets.

@Kruithne
Created January 24, 2017 09:29
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 Kruithne/a889c8ff047c3eb9b5a087bbf95deb4b to your computer and use it in GitHub Desktop.
Save Kruithne/a889c8ff047c3eb9b5a087bbf95deb4b to your computer and use it in GitHub Desktop.
Mini jQuery object constructor
renderObject = (target) => {
var elem = $(target.tag || "<div/>");
for (var prop in target) {
if (!target.hasOwnProperty(prop))
continue;
if (prop == "tag")
continue;
elem[prop](target[prop]);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment