0

this code below I tried

queryselector('img[src*="http://webserver.com/upload/"]');

doesn't match <img src="http://WebServer.com/upload/file.jpg">

this line can't be changed and neither can selector be changed... any ways to do a case insensitive comparation of src attribute?

plus: input[value='search' i] works in no browser currently... and the code is supposted to run for endusers, not just myself...

Owyn
  • 663
  • 2
  • 8
  • 17
  • 2
    Basically...NO. CSS is case sensitive and if you can't change the HTML or selector you're out of luck. You *could* add another correct selector below the first though – Paulie_D Aug 14 '15 at 11:25
  • http://stackoverflow.com/questions/5085262/jquery-validate-how-do-i-ignore-letter-case – Paulie_D Aug 14 '15 at 11:54
  • @Paulie_D: Case insensitive selectors are there as part of Selectors Module 4 but (a) it has low browser support and (b) it doesn't seem to be working with JS selector API - http://stackoverflow.com/questions/5671238/css-selector-case-insensitive-for-attributes – Harry Aug 14 '15 at 12:28
  • @Harry: It should work, the only selectors that aren't guaranteed to work in the Selectors API are dynamic pseudo-classes and pseudo-elements - for all other purposes the selectors supported in CSS are a subset of the ones in the Selectors API, not the other way around. I left a comment on the other answer. – BoltClock Aug 14 '15 at 15:08
  • Oh thanks @BoltClock I just saw the comment in the other answer and hadn't bothered to check :D – Harry Aug 14 '15 at 15:14

0 Answers0