I meant to ask... What is the actual goal here? Can you give a little
background? Maybe there is another way to accomplish what you want to do
that doesn't rely on cloning the jQuery constructor.

> I want to clone the jQuery object $ to $D; but it actually seems to be
> overwriting. Can anyone please suggest any solution?
> 
> Here is the code:
> 
> $D = $.extend($); // same result for $D = $;
> $D.fn.extend({
>         click: function() {
>                               alert('overridden click');
>                 return this;
>         }
>       });
> 
> $(document).ready(function(){
>       $('body').click(); // this also triggers the 
> 'overridden click' --
> which is what I want to avoid.
>       $D('body').click();
> });
> 
> As you see, $('body').click() triggers the 'overridden click', but I
> wanted it to trigger the original jQuery object's click.

Reply via email to