Good day,
Hitting unsupported pseudo when upgrade jQuery to v1.12.4.
Here is my jsp code:
<label name="role.label">maker</label>
And here is my jQuery code:
$(':label[name="role.label"]').show();
All these are working fine before I upgrade my jQuery. After I upgrade it, I am hitting Uncaught Error: Syntax error, unrecognized expression: unsupported pseudo: label
.
Found that the solution is :
$('[name="role.label"]').show();
By remove the :label
in front.
However, I have thousand of similar jQuery function, any other solution on this? Or this is the only solution?
Addition, there are some place that do not need to change, for example input
:
$(':input[name="bankUserProfile.userGroup.role.name"]').val(data);
This one work either in old jQuery and v1.12.4.
Good day,
Hitting unsupported pseudo when upgrade jQuery to v1.12.4.
Here is my jsp code:
<label name="role.label">maker</label>
And here is my jQuery code:
$(':label[name="role.label"]').show();
All these are working fine before I upgrade my jQuery. After I upgrade it, I am hitting Uncaught Error: Syntax error, unrecognized expression: unsupported pseudo: label
.
Found that the solution is :
$('[name="role.label"]').show();
By remove the :label
in front.
However, I have thousand of similar jQuery function, any other solution on this? Or this is the only solution?
Addition, there are some place that do not need to change, for example input
:
$(':input[name="bankUserProfile.userGroup.role.name"]').val(data);
This one work either in old jQuery and v1.12.4.
Share Improve this question asked Dec 19, 2016 at 2:35 Panadol ChongPanadol Chong 1,90316 gold badges66 silver badges140 bronze badges 1-
Never seen that selector
:label
, are you sure it wasn't a custom extension? Can't really see why it would be of benefit over the tagnamelabel
either.:input
however also includes<select>
and<textarea>
– charlietfl Commented Dec 19, 2016 at 2:45
2 Answers
Reset to default 2I would suggest just using the tagname for <label>
and if there are attributes in selector keep those also
$('label[name="role.label"]').show();
beyond that you don't seem to have any other issues and can follow the documented pseudo selectors in the selectors api
Note that :label
is not documented
I have encountered the same issue. Based on research, I went and remove label tag.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745038577a4607673.html
评论列表(0条)