I'm trying to register a simple plugin with livequery, but it
doesn't work as expected.

Code snippet:

$.fn.confirm = function() {
    this.click(function() {
        return window.confirm("Are you sure you want to " +
this.innerHTML.toLowerCase() + "?");
    });
};

if ($.livequery) {
    $.livequery.registerPlugin('confirm');
}


Testing:

<p><a href="#" class="delete">Delete</a></p>
<p><a href="#" class="ajax">Ajax apend</a></p>

jQuery(document).ready(function($) {
    $('a.delete').confirm();
    $('a.ajax').click(function(){
        $(this).parent().append('<p><a href="#" class="delete">Delete</
a></p>');
        return false;
    });
});

     Any idea, why it's not working? TIA

--
  <?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com    Blog: http://rajeshanbiah.blogspot.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to