首页 > Web开发 > 详细

jquerylike wrap

时间:2014-11-06 12:16:34      阅读:234      评论:0      收藏:0      [点我收藏+]
 1 function $(selector){
 2  return new O(document.getElementById(selector));
 3 }
 4 function O(ele){
 5  this.ele=ele;
 6 }
 7 O.prototype.show=function(){
 8  this.ele.style.display=‘‘;
 9  return this;
10 };
11 O.prototype.hide=function(){
12  this.ele.style.display=‘none‘;
13  return this;
14 };
15 $(‘#id‘).show().hide();

 

jquerylike wrap

原文:http://www.cnblogs.com/rocky2/p/4078080.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!