Ok, I know why this is happening.  This is the issue where Ajax loaded
content is not in the jQuery DOM tree, so you have to use a non Ajax
loaded selector in order to respond to the event.

Steve

On Jun 22, 9:14 pm, Steve the Canuck <steve.san...@gmail.com> wrote:
> Thanks, yes, I should have mentioned - I do have jQuery.noConflict()
> declared at the top of each of my scripts to avoid conflicts in
> general.
>
> I've also stepped through the code in a debugger using Firebug.  I put
> a breakpoint on my selector for the anchor tag, and I see in the
> debugger that it seems to go right past the selector.
>
> But, if I put this link outside the table and run it through the
> debugger, the selector does work properly.
>
> Regards,Steve
>
> On Jun 22, 8:04 pm, Charlie <charlie...@gmail.com> wrote:
>
> > have you tried using jQuery.noConflict();  
> > ?http://docs.jquery.com/Using_jQuery_with_Other_Libraries
> >StevetheCanuckwrote:Thanks, I tried this, but it doesn't seem to work: 
> >jQuery('.cancel_posting').click( function(e) { alert("got here"); if 
> >(!confirm("Are you sure you want to cancel this booking?")) { 
> >e.preventDefault(); } }); On Jun 22, 3:17 pm, "Cesar 
> >Sanz"<the.email.tr...@gmail.com>wrote:Use jQuery and not $ ----- Original 
> >Message ----- From: "StevetheCanuck"<steve.san...@gmail.com>To: "jQuery 
> >(English)"<jquery-en@googlegroups.com>Sent: Monday, June 22, 2009 10:34 AM 
> >Subject: [jQuery] Re: Click events handling conflict due to prototype? 
> >Btw... I do have a workaround - register my click event on something outside 
> >the table, such as the body tag, and then check the original event target.  
> >I'd prefer to target just the list item and anchor though if possible. On 
> >Jun 22, 11:14 am,StevetheCanuck<steve.san...@gmail.com>wrote:Hi,I have a 
> >simple list inside a table<ul class="col_actions"> <li 
> >class="cancel_posting"> <a 
> >href="/frontend_dev.php/organizer/cancel-booking/20" 
> >linkindex="18">Cancel</a> </li> </ul>I have a ready event handler for click 
> >events on the anchor:$j('.cancel_posting').click( function(e) { if 
> >(!confirm("Are you sure you want to cancel this booking?")) { 
> >e.preventDefault(); } });However, this event doesn't seem to fire because 
> >the table has some prototype controls inside it.If I just copy the list 
> >outside the table as a test, it seems like the event handler works fine.I am 
> >using jquery for all my own code, but some widgets from my PHP framework 
> >(symfony) are built in prototype, so I've been using both to some extent.Any 
> >ideas about how I can rectify this?Thanks!Steve

Reply via email to