jquery-总结

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

$( "
", { "class": "test", text: "Click me!", click: function() { $( this ).toggleClass( "test" ); }, on{ touchstart: function( event ) { // Do something } } }) .appendTo( "body" );

你可能感兴趣的:(jquery-总结)