Less than/greater than attribute filtering e.g. $("element [attribute>='value']")
Hi everybody,
I have for the past couple of hours tried to find a way to do a greater than and less than comparison in jQuery, as I'm doing some frontend filtering on a XML dataset. So I have been looking at a way of doing something like this:
$("element [attribute>='value']")
I havent been able to find a solution so I looked into the jQuery code and found that I could solve this issue altering the jQuery core where it looks at possible attribute filtering types (approximately around line 4129-4145) by adding the following four lines:
type === ">=" ?
value > check :
type === "<=" ?
value < check :
I'm therefore proposing adding some kind of feature kind of greater than/less than filtering of attributes something like the one specified above.
Kind regards
Kim Løwert