[jQuery] Re: inline delete ajax function/confirm dialog

2009-08-28 Thread spill50
Hi Rick, Thanks for your reply. I tried using the .live function but it hasn't solved the problem. When I click a delete icon the first time it changes the tr bg colour then opens the dialog, if I cancel it it resets the tr colour then closes the dialog. From then, when I click on a delete

[jQuery] Re: inline delete ajax function/confirm dialog

2009-08-28 Thread spill50
Hi Irwan, Thanks for your reply. I am using a class to trigger the function $(.delete_icon).click (function() { the id on each element is unique anyway as the table is dynamically generated on the server before its sent to the browser. The value if the id attribute is the user id pulled from

[jQuery] Re: inline delete ajax function/confirm dialog

2009-08-27 Thread Rick Faircloth
Sounds like a job for the .live function... Try this in place of your first line of code below: $(.delete_icon).live('click', function() { That basically reapplies the click functionality to any new .delete_icon elements added to the DOM by your ajax function. Rick -Original Message-

[jQuery] Re: inline delete ajax function/confirm dialog

2009-08-27 Thread Meroe
Richard, A similar question was asked not to long ago. Here is the reply (not from me). If I recall correctly this resolved the issue. Hi, id is designed to work with only 1 instance in a web page. If you need multiple instances of an element, use class=newsTrigger instead of