How to filter by (attr >= value)?
Brief overview: This is a calendar system in day view (displaying minutes down the left side) and I'm using divs for each time slot. I'm trying to only select timeslots after a certain timestamp.
Example:
- <div class="rc-timeslot" data-time="1265040000"></div>
- <div class="rc-timeslot" data-time="1265040300"></div>
- <div class="rc-timeslot" data-time="1265040600"></div>
I'd like to only grab timeslots that match:
- .attr("data-time") >= 1265040300
How would I go about this efficiently? I know I can do this:
- $("div.rc-timeslot").each(function() {
- if($(this).attr("data-time") >= 1265040300) {
- // add to valid selections here
- }
- });
...but that seems resource-heavy. Suggestions?