Seems that the Drupal installation for plugins are down, so I cannot
access the behavior this time.

I tried the other way, adding to $(document).ready this test:
$('body').click(function(event) {
                        if ($(event.target).is('[EMAIL PROTECTED]')) {
                                alert("You clicked a default");
                                return defChanger();
                        }
                });

The function defChanger returns always false, in the purpose of
preventing the submission of any links.

The alert is shown, but the page is opened, thus prevention not
working....



On Jul 5, 4:54 pm, Scott Sauyet <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Is it a fact that dynamically created content cannot trigger JS events?
>
> No.  The problem is that the binding is done on specific items and not
> on some abstract class of items.  When you later add items, they don't
> have your particular bindings associated with them.
>
> If you are using 1.1.3, you can use the Behavior plugin:
>
>      http://jquery.com/plugins/project/behavior/
>
> If not, look at the techniques in this article, especially the final one:
>
>      http://docs.jquery.com/Tutorials:AJAX_and_Events
>
> Cheers,
>
>    -- Scott

Reply via email to