Log In | Register | May 20, 2024


jQuery Programming - August 31, 2010

Selecting different page elements using Jquery

jQuery makes it easy to reference any element on the page. If we wanted to select all the paragraphs on a page or all the inputs fields on a page the code would be all the same using jQuery. First off you need to remember for all jQuery code, you will be processing it between the  document ready function. $(function() { // code goes here }); Lets say we wanted to select all the paragraph elements on […]

Back To Top

jQuery Programming - August 31, 2010

Adding and Removing classes and attributes using jQuery

Adding / Removing Classes and Attributes Using jQuery Adding and Removing attributes on elements is simple. With jQuery you can easily add or remove classes, add or remove attributes, as well as many more effects. First, as with any jQuery script, you will need to write the document ready function to start using your jQuery functions. $(function() { // code goes here }); Lets say we had some html elements as follows: <p>This is a paragraph.</p> <p>This […]

Back To Top

Need Help? Ask a Question

Ask anything you want from how to questions to debug. We're here to help.

You Must Be Logged In To Post A Question.

Log In or Register