jQuery :lt() selectorThe :lt() selector selects the elements that have lesser index value than the value specified in the index parameter of the :lt() selector. The index starts at 0. We can use the :gt() selector to select the elements having a larger index value than the specified index. SyntaxThe index in the above syntax is the required parameter. The parameter specifies which element is to be selected. The elements that have a lower index value than the specified value will get selected. Let's see an illustration to understand the working of the :lt() selector. ExampleIn this example, we are applying the :lt() selector on the table elements. Here, we are specifying the index value 4, so the selector will return the elements having index values lower than 4. Test it NowOutput After the execution of the above code, the output will be - After clicking the given button, the output will be - Next TopicjQuery :gt() selector |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India