write less ,do more-------http://api.jquery.com
1.If no elements match the provided selector, the new jQuery object is "empty"; that is, it contains no elements and has .length property of 0.
2.jQuery( html, attributes ),to create html element with its attr and event
$( "<div/>", {
"class": "test",
text: "Click me!",
click: function() {
$( this ).toggleClass( "test" );
},
on{
touchstart: function( event ) {
// Do something
}
}
})
.appendTo( "body" );