jQuery :lt() selector
The :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.
The 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.
In 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 Now
After the execution of the above code, the output will be -
After clicking the given button, the output will be -
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week