Is there a selector in jQuery that will allow me to select all anchor tags that have a href beginning with href="/products/index?page="?
My full href is href="/products/index?page=2", but they all have the beginning in common.
You can use the starts-with attribute selector, like this:
$("a[href^='/products/index?page=']")
In case you're curious, there are other attribute selectors available as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With