Hy,
My question is verry simple, but i can’t get grip on the answer.
I’m making an addon for chrome, that search for an image, and when that image is found on the page, it will do some stuff.
I first had this piece of code:
if($('img[src="http://cdn2.tribalwars.net/graphic/unit/att.png?169e1"]').length > 0){
And that worked just fine. But today it didn’t work. and i know why. Because after the.png comes an random code. because today it is ibdd4.
So how can i search for the image without the ?random code
Because i don’t need that random code…
You can use the ‘
startswith‘ selector:http://api.jquery.com/attribute-starts-with-selector/