selector instanceof jQuery,return itself
Can i do this, add a judge, when selector is instanceof jQuery,return identical.
Will it cause some bug in some situation?
Thanks for anyone reply.
jQuery = function( selector, context ) {
// add this return -->
if(selector instanceof jQuery){
return selector;
}
// <--
return new jQuery.fn.init( selector, context );
},