Selector –> :first used to select the first element.
Now suppose you want to select first p element on the page, then jQuery provides a very useful and powerful selector called ":first" that selects the first element. Its usage...
jQuery making the javascript simpler
Now suppose you want to select first p element on the page, then jQuery provides a very useful and powerful selector called ":first" that selects the first element. Its usage...
Now suppose you want to select last p element on the page, then jQuery provides a very useful and powerful selector ":last" that selects the last element. Its usage can...
Now suppose we are creating a list and want to apply different styles to odd and even items of the list then we can us the following syntax: $("li:even") The...
In the last topic, we have seen the use of ":even" to apply changes to even occurrences of any element, now lets look one another selector ":odd" to select odd...
Now i will show you some of the interesting jQuery selectors. Suppose you want to select 5th tr element(or the elements which are comes after 5th element, or before that)...
<!--This example will show you how to write jQuery code actually and what is document.ready event in jQuery --> <!-- we will show an alert "hello world" when the document...
Before proceeding with the code, the first requirement is to understand the DOM or Document Object Model. The DOM explains how the window is related to document, how a document...
The first jQuery selector that we will look is * which is used to select all elements of the page. It can be used as follows: $("*") Now lets look...
We have seen the $ and how to write the jQuery code in our page. Now we will gradually go into the various functions and methods that are available in...
Here we will see how to access an element in jQuery with its id. Recall the code that we use in javascript to get an element with its id: document.getElementById("firstptag")...