Jquery create new system api

 
jQuery.fn.exists =function(){returnthis.length>0;}

if($(selector).exists()){
   
// Do something
}
posted @ 2012-09-27 14:53  webglcn  阅读(161)  评论(0编辑  收藏  举报