I have a problem which i just cannot figure out how to solve! if you have any ideas, please assist 🙂
in my DOM there are a bunch of objets, as below:
<div id=Line1>1</div>
<div id=Line2>2</div>
<div id=Line3>3</div>
<div id=Line4>4</div>
<div id=Line5>5</div>
<div id=Line6>6</div>
<div id=Line7>7</div>
<div id=Line8>8</div>
<div id=Line9>9</div>
<div id=Line10>10</div>
I need to get a jQuery object containing any div which is Line6-10 (i.e. that contains 6 or above)…. i’ve tried toying with .gt() but to no avail.
Help would be appreciated
Select
<div>with id which starts with ‘Line’, then reduce the matched set to those after the 5th (indexing is 0-based):DEMO