文章分类 - Jquery
摘要:网页可见区域宽:document.body.clientWidth 网页可见区域高:document.body.clientHeight 网页可见区域宽:document.body.offsetWidth (包括边线的宽) 网页可见区域高:document.body.offsetHeight (包括...
阅读全文
摘要:使用方法首先你需要引入skrollr.min.js文件,然后在文档加载完成后调用init()函数 改变背景的例子,当滚动条在顶部的时候颜色是rgb(0,0,255)。当滚动500px颜色是rgb(255,0,0),你只需要写出关键帧的状态,skrollr会自己添加过度帧。WOOOTView in b...
阅读全文
摘要:var Common={}; Common.Touchmove=function(){ window.ontouchmove=function(e){ /*禁止页面滚动*/ e.preventDefault && e.preventDefault...
阅读全文
摘要:封装函数: 使用方法一: 使用方法二:
阅读全文
摘要:html: js:$(function(){ function loadIm...
阅读全文
摘要:if (window.XMLHttpRequest) { // Mozilla, Safari, ... http_request = new XMLHttpRequest();} else if (window.ActiveXObject) { // IE http_request =...
阅读全文
摘要:下载地址:https://github.com/ftlabs/fastclickhttp://amazeui.org/1.x/javascript/fastclick/从点击屏幕上的元素到触发元素的 click 事件,移动浏览器会有大约 300 毫秒的等待时间。为什么这么设计呢? 因为它想看看你是不...
阅读全文
摘要:var id=null;var random= Math.random();if(random< 0.1) id= 0;else if(random< 0.3) id= 1;else if(random< 0.35) id= 2;else if(random< 0.65) id =...
阅读全文
摘要:http://www.cnblogs.com/crookie/p/3796931.htmlhttp://mottie.github.io/Keyboard/docs/mobile.htmlhttp://mottie.github.io/Keyboard/页面效果参照PolarBear的使用CSS3制...
阅读全文
摘要:$(".tel span").html($(".tel span").text().substring(0,3)+"****"+$(".tel span").text().substring(8,11));$(".tel span").html($(".tel span").text().subst...
阅读全文
摘要:1.javascript创建元素 创建select var select = document.createElement("select"); elect.options[0] = new Option("加载项1", "value1"); selec...
阅读全文
摘要:js/jquery判断浏览器类型的方法小结浏览器代码名称:navigator.appCodeName浏览器名称:navigator.appName浏览器版本号:navigator.appVersion对Java的支持:navigator.javaEnabled()MIME类型(数组):navigat...
阅读全文
摘要:https://github.com/boblemarin/jQuery.eraser下载:http://i.cnblogs.com/Files.aspx
阅读全文
摘要:Document睡懒觉烦死了看时间东方丽景代码二: Document水电费的说法
阅读全文
摘要:1.你的option中没有设置value,取不到值。如果设置了,$("#22").val()2.要取到fdsfds这个值,用$("#22").html()$(function(){ $('select').bind('change', function () { $(t...
阅读全文
摘要:Array类型并没有提供去重复的方法,如果要把数组的重复元素干掉,那得自己想办法:function unique(arr) { var result = [], isRepeated; for (var i = 0, len = arr.length; i < len; i++) { ...
阅读全文
摘要:http://touch.code.baidu.com/ http://touch.code.baidu.com/examples.html 下载:http://touch.code.baidu.com/touch-0.2.14.min.js 说明文档:http://cloudajs.org/doc
阅读全文
摘要:案例测试:function TouchLeft(){ var startX, startY, moveEndX, moveEndY, X, Y; $(".howPlay,.xqing").on("touchstart", function(e) { // e.preventD...
阅读全文