0

Hello

Im trying to modify something when clicking on a input text field. The id of that field is cart[1223686][qty].

Tried your standard:

$j("#cart[1223686][qty]").click(function() {
alert("Handler for .click() called.");
});

But nothing. What is wrong?

(Yes, $j is correct)

2
Contributors
2
Replies
3
Views
4 Years
Discussion Span
Last Post by riahc3
1

jQuery thinks you're looking for #cart with attributes [1223686][qty].

if you want to look for that element, you have to specify the id attribute and value instead. Like this :

$j("[id='cart[1223686][qty]']").click(function() {
    alert("Handler for .click() called.");
});
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.