bill_home
asked on
jquery selector no longer working in version 2.1.0.min
Hello Experts,
This selector worked in 1.7.1. min, now I am getting the following error in Chrome. Does anyone know why?
$('input:checkbox[@id]').f ilter(func tion () {
uncaught Error: Syntax error, unrecognized expression: input:checkbox[@id] jquery-2.1.0.min.js:2
This selector worked in 1.7.1. min, now I am getting the following error in Chrome. Does anyone know why?
$('input:checkbox[@id]').f
uncaught Error: Syntax error, unrecognized expression: input:checkbox[@id] jquery-2.1.0.min.js:2
ASKER
no not a typo
it has been that way for a long time. I searched back releases.
it has been that way for a long time. I searched back releases.
ASKER
Here is the code up to the else statement
function NodeChecked(currentNode) {
var id = currentNode.id;
var currentCheckbox = $('#' + id);
if (currentCheckbox.is(':chec ked') == true) {
// It's a primary node
if (id.indexOf('-') <= 0) {
$('input:checkbox[@id]').f ilter(func tion() {
var regex = new RegExp('^' + id + '-');
if ($(this).attr('id').match( regex) !== null) {
$(this).prop('checked', true);
}
});
}
} else {
function NodeChecked(currentNode) {
var id = currentNode.id;
var currentCheckbox = $('#' + id);
if (currentCheckbox.is(':chec
// It's a primary node
if (id.indexOf('-') <= 0) {
$('input:checkbox[@id]').f
var regex = new RegExp('^' + id + '-');
if ($(this).attr('id').match(
$(this).prop('checked', true);
}
});
}
} else {
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That was it thanks for the fast response
I'm happy to help you, we have been lucky: I never heard about @ in jquery! ;-)
ASKER
Every upgrade we find some interesting "changes".
Thanks Again
Bill
Thanks Again
Bill
$('input:checkbox[#id]').f
Or it's a typo?