i’m having trouble applying .live function to a specific input tag having a unique id. Am i doing it the wrong way? Any suggestions?
$('input.newQty').live('change', function(){
}); //works
$('input.newQty[id="'+naam+'"]').live('change', function(){
}); //does not work
Update: If you must use live events in this case then I would fork out the function that is the event handler and not have it as an anonymous function. This is probably what I would do.
As far as I know live selectors can not be dynamic. As in you can not construct a selector for a live event by joining variables on run time. They need to be evaluated in entirety for them to work.
Hence you can not have a live expression as
Your best approach will be to use it on the class selector as you have done correctly.