Hi polyrhythmic,

what reversion number of jquery you use?
i use the newest jquery from svn.reversion number of the jquery is #3973,is
that of you used?

* $Date: 2007-11-29 07:53:54 +0800 (星期四, 29 十一月 2007) $
* $Rev: 3973 $

Regards
Jacky

2007/11/30, polyrhythmic <[EMAIL PROTECTED]>:
>
>
> Hello Jacky,
>
> I can't reproduce your error.  jQuery.extend should work for
> functions, this is how it works internally.  Perhaps there is an issue
> in your code I cannot see.  I ran the following through the Firebug
> console just now with these results:
> [ >>>> : my commands ]
>
> >>> var targetfn = function() { console.log('I am tgtfn'); };
> >>> targetfn();
> I am tgtfn
> >>> $.extend(targetfn, { childfn: function() { console.log('I am
> childfn'); } });
> function()
> >>> targetfn.childfn();
> I am childfn
> >>> alert(typeof targetfn.childfn);
> [alerted "function"]
>
> What browser are you testing in?  I know that there are issues with
> typeof not returning the proper value for functions, that's part of a
> long discussion on the jQuery-dev list:
>
> http://groups.google.com/group/jquery-dev/browse_thread/thread/89cc50c9e936feb6?hl=en
> Things are running right for me in Firefox 2.0.0.10 on XP.
>
> Charles
>
> On Nov 29, 4:15 am, Jacky <[EMAIL PROTECTED]> wrote:
> > /*
> >  * jQuery 1.2.1 - New Wave Javascript
> >  *
> >  * Copyright (c) 2007 John Resig (jquery.com)
> >  * Dual licensed under the MIT (MIT-LICENSE.txt)
> >  * and GPL (GPL-LICENSE.txt) licenses.
> >  *
> >  * $Date: 2007-11-29 07:53:54 +0800 (星期四, 29 十一月 2007) $
> >  * $Rev: 3973 $
> >  */
> >
> > the jQuery reversion is #3973,function can't extend with
> > jQuery.extend.
> >
> > function target(){
> > /**some code here*/
> >
> > }
> >
> > jQuery.extend(target,{
> >     someMethod:function(){
> >         /** some code here */
> >     }
> >
> > });
> >
> > alert(typeof target.someMethod);    // type of target.someMethod is
> > undefined
>

Reply via email to