Javascript Value Composed Of Several Words [value=dog Crazy]
thanks for the help in this forum, I was able to get my code to work: // ==UserScript== // @name PARINGO // @description Auto select rpt radio button // @namespace PARINGO
Solution 1:
If an attribute consists of several words than you have to use quotes like this:
"input[type=radio][value='dog crazy']"
Solution 2:
Try putting the value in quotes
"input[type=radio][value='dog crazy']"
Solution 3:
You are using jQuery'sfind method. Put the values in quotes:
"input[type=radio][value='dog crazy']"
There are examples like this in the jQuery documentation for Attributes in selectors. For example:
- double quotes inside single quotes:
$('a[]')
- single quotes inside double quotes:
$("a[rel='']")
Specifically, the docs state:
Attribute values in selector expressions must follow the rules for W3C CSS selectors, in general that means anything other than a simple identifier should be surrounded by quotation marks.
Post a Comment for "Javascript Value Composed Of Several Words [value=dog Crazy]"