随笔分类 -  js

摘要:1 /* 2 * 封装$.ajax函数 3 * =============*/ 4 $.Ajax = function(url, options){ 5 if(typeof options == 'undefined'){ 6 options = url; 7 } 8 if(typeof url == 'string'){ 9 ... 阅读全文
posted @ 2016-06-21 14:48 下一个雨季~ 阅读(873) 评论(0) 推荐(0)
摘要:1 /* 2 * 日期格式化 3 * =========*/ 4 function dateformat(date, format){ 5 var paddNum = function(num){ 6 num += ""; 7 return num.replace(/^(\d)$/, "0$1"); 8 } 9 if(... 阅读全文
posted @ 2016-06-21 14:44 下一个雨季~ 阅读(183) 评论(0) 推荐(0)
摘要:1 /* 2 * 绑定element resize事件 3 * =====================*/ 4 resize: function(element, callback){ 5 var delay = 500; //window resize事件延时500毫秒 6 ... 阅读全文
posted @ 2016-04-26 18:14 下一个雨季~ 阅读(695) 评论(0) 推荐(0)