views:

16

answers:

1

Hello Folks,

I do use jQuery live() to bind a 'click' event to certain images. This results in the following internal live-selector:

#tblViews tbody tr[rel=view_4].next() table.editable.includes span.actions img.remove

When I click on such an image, the following error occurs:

Syntax error, unrecognized expression: )

I think the problem might be the .next() in the selector - but how to get rid of that?

Thanks a lot, Remo

+1  A: 

It does say in the documentation the 'live' cannot be used like that. you need to have a complete

$('selector').live( function(){});  

For example,

$('select1').next('select2').live(...); 

will not work.

I'm going to assume you're using the .next() because you want the second matching tr. In this case I suggest using tr[rel=view_4]:eq(1) in the selector instead.

If you provide the code you use to bind the live event I should be able to write a version that will work correctly with jquery live.

Have fun :)

sillyMunky