jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.
get elements by any css selector $('#content div.post a') Get all a elements inside a div with a class of post that is inside an element with an id of content.
jQuery Methods Each jQuery object comes with a ton of methods for getting/setting attributes, manipulating and traversing elements, observing events and interface effects.
<br/>$('#content').html();<br/>// Same concept as innerHTML<br/>// <p>A paragraph.</p><br/>$('#content').html('<p>New content.</p>');<br/>// Same concept as innerHTML = '';<br/>// #content's inner html would now be <p>New content.</p><br/> http://docs.jquery.com/Attributes
It's an HTTParty and Everyone is Invited Here is the text for the post.
<br/>// sets the text color of div#post-1 to green<br/>$('#post-1').css('color', 'green');<br/>// sets the background color of div#post-1 to red<br/>$('#post-1').css('background', 'red');<br/> http://docs.jquery.com/CSS
It's an HTTParty and Everyone is Invited Here is the text for the post.
<br/>// gets the id attribute of #post-1<br/>$('#post-1').attr('id'); // "post-1"<br/>// sets the id attribute of #post-1 to some-new-id<br/>$('#post-1').attr('id', 'some-new-id');<br/> http://docs.jquery.com/Attributes