Skip to content

Instantly share code, notes, and snippets.

@minhd
Created September 3, 2012 05:03
Show Gist options
  • Save minhd/3606821 to your computer and use it in GitHub Desktop.
Save minhd/3606821 to your computer and use it in GitHub Desktop.
jquery object creation shorthand
$("<div />",
{
    id: "test",
    name: "test",
    class: "test-class",
    css: {
        width: "100px",
        height: "100px",
        backgroundColor: "#fff"
    }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment