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: "Steve the Canuck" <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, Steve the Canuck <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