This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.MSWrapper .MSSlide { | |
-webkit-transition: all 0.2s 0s ease-in-out; | |
-moz-transition: all 0.2s 0s ease-in-out; | |
-ms-transition: all 0.2s 0s ease-in-out; | |
-o-transition: all 0.2s 0s ease-in-out; | |
transition: all 0.2s 0s ease-in-out; | |
} | |
.MSWrapper .MSSlide.MSSlideNA { | |
-webkit-transition: unset; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 向上滑动加载更多 | |
* DEMO <button class="ui-btn ui-corner-all get_more" data-page="2" data-url="url" data-func="loadMoreList">点击获取更多</button> | |
* data-page页面,data-url异步链接,data-func异步完成列表处理方法 | |
* @requires jQuery_mobile.js | |
*/ | |
;(function ($) { | |
$.fn.getMore = function (opts, argv) { | |
if($(this).length === 0){ | |
return false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.cycleHeadPic = function(options){ | |
var setting = { | |
class:'cycle-head-pic', | |
} | |
setting = $.extend(true, setting, options); | |
this.each(function(){ | |
var cont = $('<div>').addClass(setting.class + '-cont'); | |
var box = $('<div>').addClass(setting.class); | |
box.append(cont).after($(this)); | |
cont.append($(this)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fixScreen = function() { | |
var metaEl = doc.querySelector('meta[name="viewport"]'), | |
metaCtt = metaEl ? metaEl.content : '', | |
matchScale = metaCtt.match(/initial\-scale=([\d\.]+)/), | |
matchWidth = metaCtt.match(/width=([^,\s]+)/); | |
if ( metaEl && !matchScale && ( matchWidth && matchWidth[1] != 'device-width') ) { | |
var width = parseInt(matchWidth[1]), | |
iw = win.innerWidth || width, | |
ow = win.outerWidth || iw, | |
sw = win.screen.width || iw, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.limitint = function(options){ | |
var setting = { | |
limit:5 | |
}; | |
if(options != undefined){ | |
setting = $.extend(setting, options); | |
} | |
this.on('blur.limitint',function(event){ | |
var value = parseInt($(this).val()); | |
$(this).val( (isNaN(value) || value < setting.limit) ? setting.limit : value ); |