Documentation

Core/gt

From jQuery JavaScript Library

Jump to: navigation, search

« Back to Core

gt( position )

Reduce the set of matched elements to all elements after a given position.
The position of the element in the set of matched elements starts at 0 and goes to length - 1.
Arguments:
positionNumber
Reduce the set to all elements after this position.

Examples:
Reduces the selection to elements with an index greater then 0.

$("p").gt(0)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
                    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
  
  <script>
  $(document).ready(function(){
    $("p").gt(0)
  });
  </script>
  
</head>
<body>
  <p>This is just a test.</p><p>So is this</p>
</body>
</html>

NameType