82
rated 0 times
[
87]
[
5]
/ answers: 1 / hits: 67371
/ 14 Years ago, fri, may 7, 2010, 12:00:00
According to the selectors docs, you must escape [
with double backslash, etc \[
.
I have a selector that is created like so (assume val
attribute is something[4][2]
in this example).
var val = $(this).attr('val');
$select.find('option[value=' + val + ']').show();
Can I write a regex to escape the brackets for me?
More From » jquery