That's an exotic situation.
I'll give you 2 options:

1-

var $D = $.extend( true, function( selector, context ) {
   return new $D.fn.init( selector, context );
}, $ );

This MIGHT work, I never really tried something like this.

2-
   Maybe jQuery.Collection is what you need. It lets you create jQuery-
like collections with your own methods, not only for DOM elements. You
can create as many as you want and even use inheritance.

HomePage: http://flesler.blogspot.com/2008/01/jquerycollection.html

Hope this helps.

--
Ariel Flesler
http://flesler.blogspot.com

On 24 mayo, 18:48, "R. Rajesh Jeba Anbiah"
<[EMAIL PROTECTED]> wrote:
> 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.
>
> --
>   <?php echo 'Just another PHP saint'; ?>
> Email: rrjanbiah-at-Y!com    Blog:http://rajeshanbiah.blogspot.com/

Reply via email to