Is there a way to identify the selector is by the spesific background-image. Is there a way to do this?
<ul style="background-image:url(/test/test/shortcutsMenu-test.png);">
I know this is not the right way to do it, but I’m manipulating a website to a mobile version of the same site.
You could use
filter:This will allow you to select
ulelements that have a background image defined elsewhere, not only inline. Here’s a working example.If you don’t care about that, and the background image will always be applied inline in a
styleattribute, you could use an “attribute contains” selector with thestyleattribute.Update (based on comments)
To just search for part of the file name you can use normal JavaScript string methods like
indexOf(since the jQuerycssmethod returns a string):