common-qim.min.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  1. var array_mask_Box = [];
  2. $.touchEvents = {
  3. start: $.support.touch ? "touchstart" : "mousedown",
  4. move: $.support.touch ? "touchmove" : "mousemove",
  5. end: $.support.touch ? "touchend" : "mouseup"
  6. },
  7. function (e) {
  8. e.extend({
  9. trimValue: function (e) {
  10. return e.replace(/(^\s*)|(\s*$)/g, "")
  11. },
  12. getReverse: function (e) {
  13. return e.split("").reverse().join("")
  14. },
  15. goTop: function (e) {
  16. e = e || 0,
  17. document.documentElement.scrollTop = document.body.scrollTop = e
  18. },
  19. isRegExp: function (e, t) {
  20. var n = "";
  21. switch (e) {
  22. case "isStr":
  23. n = /^[A-Za-z0-9_]+$/;
  24. break;
  25. case "isStr2":
  26. n = /^[A-Za-z0-9_\u4E00-\u9FA5\uF900-\uFA2D]+$/;
  27. break;
  28. case "isNumber":
  29. n = /^[-\+]?\d+(\.\d+)?$/;
  30. break;
  31. case "isNumber2":
  32. n = /^\d+(\.{0,1}\d+){0,1}$/;
  33. break;
  34. case "isInt":
  35. n = /^[-\+]?\d+$/;
  36. break;
  37. case "isInt2":
  38. n = /^[1-9]*[1-9][0-9]*$/;
  39. break;
  40. case "isInt3":
  41. n = /^[0-9]*[0-9][0-9]*$/;
  42. break;
  43. case "isEmail":
  44. n = /([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)/;
  45. break;
  46. case "isPhone":
  47. n = /^((\(\d{2,3}\))|(\d{3}\-))?(\(0\d{2,3}\)|0\d{2,3}-)?[1-9]\d{6,7}(\-\d{1,4})?$/;
  48. break;
  49. case "isMobile":
  50. n = /^[1]\d{10}$/;
  51. break;
  52. case "isIdCard":
  53. n = /(^\d{15}$)|(^\d{17}[0-9Xx]$)/;
  54. break;
  55. case "isMoney":
  56. n = /^\d+(\.\d+)?$/;
  57. break;
  58. case "isZip":
  59. n = /^[1-9]\d{5}$/;
  60. break;
  61. case "isQQ":
  62. n = /^[1-9]\d{4,10}$/;
  63. break;
  64. case "isEnglish":
  65. n = /^[A-Za-z]+$/;
  66. break;
  67. case "isChinese":
  68. n = /^[\u0391-\uFFE5]+$/;
  69. break;
  70. case "isUrl":
  71. n = /^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/;
  72. break;
  73. case "isDate":
  74. n = /^\d{4}-\d{1,2}-\d{1,2}$/;
  75. break;
  76. case "isDatetime":
  77. n = /^\d{4}-\d{1,2}-\d{1,2}\s\d{1,2}:\d{1,2}:\d{1,2}$/;
  78. break;
  79. case "isPw":
  80. n = /^[a-zA-Z]\w{5,17}$/;
  81. break;
  82. case "isChina":
  83. n = /[\u4E00-\u9FA5\uF900-\uFA2D]/;
  84. break;
  85. case "isIP":
  86. n = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;
  87. break;
  88. default:
  89. n = ""
  90. }
  91. if ("" == n)
  92. return !1;
  93. var i = new RegExp(n);
  94. return i.test(t)
  95. },
  96. isAjaxLoad: !1,
  97. getAjaxData: function (t) {
  98. e.isAjaxLoad || (e.isAjaxLoad = 1 == t.isAjaxLoad,
  99. t = e.extend({
  100. url: "#",
  101. type: "POST",
  102. async: !0,
  103. cache: !0,
  104. data: {},
  105. callBack: function () { },
  106. errorBack: function () { }
  107. }, t),
  108. e.ajax({
  109. url: t.url,
  110. type: t.type,
  111. async: t.async,
  112. cache: t.cache,
  113. data: t.data,
  114. success: function (n) {
  115. if (e.isAjaxLoad = !1,
  116. 1 == n.status) {
  117. var i = n;
  118. i.params = t.params,
  119. t.callBack(i)
  120. } else
  121. t.errorBack(n)
  122. }
  123. }))
  124. },
  125. arryIndexOf: function (e, t) {
  126. for (var n in e)
  127. if (e[n] == t)
  128. return !0;
  129. return !1
  130. },
  131. replaceAll: function (e) {
  132. var t = e.strData
  133. , n = e.list;
  134. for (var i in n) {
  135. var r = ""
  136. , s = "";
  137. for (var a in n[i])
  138. r = a,
  139. s = n[i][a];
  140. r = r.replace("[", "\\[").replace("]", "\\]").replace("(", "\\(").replace(")", "\\)");
  141. var o = new RegExp(r, "g");
  142. t = t.replace(o, s)
  143. }
  144. return t
  145. },
  146. maxlenght: function (e, t) {
  147. return e.length > t && (e = e.substring(0, t) + "..."),
  148. e
  149. },
  150. inputMaxlenght: function (e, t) {
  151. var n = e.value;
  152. n.length > t && (e.value = n.substring(0, t))
  153. },
  154. getParameter: function (e) {
  155. var t = location.search;
  156. if (0 == t.length)
  157. return null;
  158. if ("?" != t.charAt(0))
  159. return null;
  160. if (t = unescape(t),
  161. t = t.substring(1),
  162. 0 == t.length)
  163. return null;
  164. for (var n = t.split("&"), i = 0; i < n.length; i++) {
  165. var r = n[i].split("=", 2);
  166. if (r[0] == e)
  167. return r.length < 2 || void 0 === r[1] || "undefined" == r[1] || "null" == r[1] ? "" : r[1]
  168. }
  169. return null
  170. },
  171. transWan: function (e, t) {
  172. var n = Number(e)
  173. , i = n / 1e4;
  174. if (i > 1) {
  175. i = i.toFixed(1);
  176. var r = i.split(".");
  177. n = 0 == r[1] ? r[0] + (t || langObj.transWan) : i + (t || langObj.transWan)
  178. }
  179. return n
  180. },
  181. setCookie: function (t, n, i) {
  182. var r = new Date
  183. , s = new Date;
  184. null == i && (i = 864e5),
  185. s.setTime(r.getTime() + i);
  186. var a = location.host;
  187. e.isRegExp("isIP", a.split(":")[0]) ? a = a.split(":")[0] : (a = a.split("."),
  188. a = 2 === a.length ? a.join(".") : a.slice(1).join(".")),
  189. document.cookie = encodeURIComponent(t) + "=" + encodeURIComponent(n) + "; expires=" + s.toGMTString() + ";path=/; domain=" + a + ";"
  190. },
  191. getCookie: function (e) {
  192. var t = encodeURIComponent(e) + "=";
  193. return document.cookie.length > 0 ? (offset = document.cookie.indexOf(t),
  194. -1 != offset ? (offset += t.length,
  195. end = document.cookie.indexOf(";", offset),
  196. -1 == end && (end = document.cookie.length),
  197. decodeURI(document.cookie.substring(offset, end))) : "") : ""
  198. },
  199. browserRedirect: function () {
  200. var e = navigator.userAgent.toLowerCase()
  201. , t = "ipad" == e.match(/ipad/i)
  202. , n = "iphone os" == e.match(/iphone os/i)
  203. , i = "midp" == e.match(/midp/i)
  204. , r = "rv:1.2.3.4" == e.match(/rv:1.2.3.4/i)
  205. , s = "ucweb" == e.match(/ucweb/i)
  206. , a = "android" == e.match(/android/i)
  207. , o = "windows ce" == e.match(/windows ce/i)
  208. , c = "windows mobile" == e.match(/windows mobile/i);
  209. return t || n || i || r || s || a || o || c ? "phone" : "pc"
  210. },
  211. isPhone: function () {
  212. var e = navigator.userAgent
  213. , t = (navigator.appVersion,
  214. !!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/));
  215. if (t)
  216. return "ios";
  217. var n = e.indexOf("Android") > -1 || e.indexOf("Linux") > -1;
  218. return n ? "android" : "other"
  219. },
  220. isWeiXinClient: function () {
  221. var e = window.navigator.userAgent.toLowerCase();
  222. return "micromessenger" == e.match(/MicroMessenger/i)
  223. },
  224. resUrl: function () {
  225. var e = location.search
  226. , t = [];
  227. if (-1 != e.indexOf("?")) {
  228. var n = e.substr(1);
  229. list = n.split("&");
  230. for (var i = 0; i < list.length; i++) {
  231. var r = list[i].split("=")
  232. , s = {};
  233. s[r[0]] = r[1],
  234. t.push(s)
  235. }
  236. var a = "";
  237. for (var o in t)
  238. for (var c in t[o])
  239. "" != c && "order_id" != c && (a += "&" + c + "=" + t[o][c]);
  240. e = a.substring(1)
  241. }
  242. return e
  243. },
  244. resetUrlParameter: function (e) {
  245. var t = location.search
  246. , n = [];
  247. if (-1 != t.indexOf("?")) {
  248. var i = t.substr(1);
  249. list = i.split("&");
  250. for (var r = 0; r < list.length; r++) {
  251. var s = list[r].split("=")
  252. , a = {};
  253. a[s[0]] = s[1],
  254. n.push(a)
  255. }
  256. var o = "";
  257. for (var c in n)
  258. for (var l in n[c])
  259. if ("" != l)
  260. if (e) {
  261. var h = "";
  262. for (var d in e)
  263. if (e[d] == l) {
  264. h = e[d];
  265. break
  266. }
  267. "" == h && (o += "&" + l + "=" + n[c][l])
  268. } else
  269. o += "&" + l + "=" + n[c][l];
  270. t = o.substring(1)
  271. }
  272. return t
  273. },
  274. changeUrlParameter: function (e, t) {
  275. if ("" == t) {
  276. var n = [];
  277. return arguments.length > 2 && (n = arguments[2]),
  278. "" != e && n.push(e),
  279. this.resetUrlParameter(n)
  280. }
  281. var i;
  282. arguments.length > 2 && (n = arguments[2]);
  283. var r = window.location.search;
  284. if (null != r && r.length > 1) {
  285. var s = r.substr(1)
  286. , a = s.split("&");
  287. if (s.indexOf(e) < 0)
  288. s += "&" + e + "=" + t;
  289. else
  290. for (var o = 0; o < a.length; o++) {
  291. var c = a[o].split("=");
  292. if (c[0] == e) {
  293. s = s.replace(a[o], e + "=" + t);
  294. break
  295. }
  296. }
  297. if (null != n && n.length > 0) {
  298. var l = n.split("&");
  299. for (o = 0; o < l.length; o++) {
  300. for (var h = !1, d = l[o].split("="), u = 0; u < a.length; u++) {
  301. c = a[u].split("=");
  302. if (c[0] == d[0]) {
  303. h = !0,
  304. s = s.replace(a[u], l[o]);
  305. break
  306. }
  307. }
  308. h || (s += "&" + l[o])
  309. }
  310. }
  311. i = location.pathname + "?" + s
  312. } else
  313. i = location.href + "?" + e + "=" + t,
  314. null != n && n.length > 0 && (i += n);
  315. return i
  316. },
  317. minedomainName: function (e) {
  318. var t = "://"
  319. , n = e.indexOf(t);
  320. n >= 0 && (n += t.length,
  321. e = e.slice(n)),
  322. e = e.split("/")[0];
  323. var i = e.split(".");
  324. return len = i.length,
  325. i[len - 2] + "." + i[len - 1]
  326. },
  327. isminiprogram: function (t) {
  328. if ("miniprogram" === window.__wxjs_environment) {
  329. var n = [".720think.com", ".wasee.com", ".v123.cn", ".sh0100.com", ".sh0001.com", ".sh0010.com", ".sh1001.com", ".sh0111.com", ".sh0110.com", ".sh1011.com", ".yy0010.com", ".yy0100.com", ".yy1101.com"]
  330. , i = (t = e.minedomainName(t),
  331. !1);
  332. for (key in n)
  333. if (1 == n[key].indexOf(t)) {
  334. i = !0;
  335. break
  336. }
  337. return !!i || (e.toast("小程序不支持打开非业务域名", "text"),
  338. !1)
  339. }
  340. return !0
  341. },
  342. timeModule: {
  343. formatTime: function (e) {
  344. var t = e.split(" ")
  345. , n = t[0].split("-");
  346. if (1 == n.length)
  347. n = t[0].split("/");
  348. var i = parseInt(n[0], 10)
  349. , r = parseInt(n[1], 10) - 1
  350. , s = parseInt(n[2], 10)
  351. , a = 0
  352. , o = 0
  353. , c = 0;
  354. if (t[1]) {
  355. var l = t[1].split(":");
  356. a = parseInt(l[0], 10),
  357. o = parseInt(l[1], 10),
  358. c = parseInt(l[2], 10)
  359. }
  360. var h = new Date(i, r, s, a, o, c);
  361. return h
  362. },
  363. compareTime: function (e, t) {
  364. var n = this
  365. , i = n.formatTime(e)
  366. , r = n.formatTime(t)
  367. , s = i.getTime() - r.getTime();
  368. return s
  369. }
  370. },
  371. fullScreen: function () {
  372. var e = document.documentElement
  373. , t = e.requestFullScreen || e.webkitRequestFullScreen || e.mozRequestFullScreen || e.msRequestFullscreen;
  374. void 0 !== t && t && t.call(e)
  375. },
  376. exitScreen: function () {
  377. document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitCancelFullScreen ? document.webkitCancelFullScreen() : document.msExitFullscreen && document.msExitFullscreen()
  378. },
  379. syRunHorseLight: function (t, n, i) {
  380. t || (t = "syNoticeUlNew"),
  381. n || (n = 1),
  382. "undefined" != typeof syTimer && clearInterval(syTimer);
  383. var r = document.getElementById(t);
  384. if (null != r) {
  385. i || (i = "li");
  386. for (var s = r.getElementsByTagName(i), a = 0, o = 0; o < s.length; o++)
  387. a += s[o].offsetWidth + 16;
  388. var c = document.getElementsByClassName("syNoticeUlbody")[0].offsetWidth;
  389. r.style.paddingLeft = c + "px",
  390. r.style.paddingRight = c + "px",
  391. r.style.width = a + 2 * c + "px",
  392. a = r.offsetWidth - c;
  393. var l = 0;
  394. syTimer = setInterval(function () {
  395. l -= n,
  396. l <= -a && (l = 0),
  397. r.style.left = l + "px"
  398. }, 20),
  399. "pc" == e.browserRedirect() && e("#syNoticeUlNew").hover(function () {
  400. clearInterval(syTimer)
  401. }, function () {
  402. clearInterval(syTimer),
  403. syTimer = setInterval(function () {
  404. l -= n,
  405. l <= -a && (l = 0),
  406. r.style.left = l + "px"
  407. }, 20)
  408. })
  409. }
  410. },
  411. isJSONstr: function (e) {
  412. if ("string" != typeof e)
  413. return !1;
  414. try {
  415. var t = JSON.parse(e);
  416. return !("object" != typeof t || !t)
  417. } catch (e) {
  418. return !1
  419. }
  420. },
  421. addJavascript: function (t) {
  422. e.ajax({
  423. url: t.src,
  424. dataType: "script",
  425. cache: !0
  426. }).done(function () {
  427. "function" == typeof t.callBack && t.callBack()
  428. })
  429. }
  430. }),
  431. e(document).on("click", ".mask_Box_overlay", function () {
  432. console.log("array_mask_Box.length=" + array_mask_Box.length),
  433. e(this).removeClass("on"),
  434. array_mask_Box.length > 0 ? (e(array_mask_Box[array_mask_Box.length - 1]).removeClass("on"),
  435. array_mask_Box.pop(),
  436. console.log("pop后array_mask_Box=" + JSON.stringify(array_mask_Box))) : e(".mask_Box.on:last").removeClass("on"),
  437. e("body,html").removeClass("ov__hidden")
  438. }).on("click", ".weui-mask", function () {
  439. e(".weui-dialog__btn.default").length > 0 && e(".weui-dialog__btn.default").click()
  440. }).on(e.support.touch ? "touchend" : "click", ".mBoxbg", function () {
  441. "false" != e(this).attr("data-close") && (e(".windowBody.on:last,.mBoxbg.on:last").removeClass("on"),
  442. e(this).hasClass("remove") && setTimeout(function () {
  443. e(".windowBody:last,.mBoxbg:last").remove()
  444. }, 300))
  445. })
  446. }(jQuery),
  447. $.support = function () {
  448. var e = {
  449. touch: !!("ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch)
  450. };
  451. return e
  452. }(),
  453. $.getTouchPosition = function (e) {
  454. return e = e.originalEvent || e,
  455. "touchstart" === e.type || "touchmove" === e.type || "touchend" === e.type ? {
  456. x: e.targetTouches[0].pageX,
  457. y: e.targetTouches[0].pageY
  458. } : {
  459. x: e.pageX,
  460. y: e.pageY
  461. }
  462. }
  463. ;
  464. var timeModule = {
  465. formatTime: function (e) {
  466. var t = e.split(" ")
  467. , n = t[0].split("-");
  468. if (1 == n.length)
  469. n = t[0].split("/");
  470. var i = parseInt(n[0], 10)
  471. , r = parseInt(n[1], 10) - 1
  472. , s = parseInt(n[2], 10)
  473. , a = 0
  474. , o = 0
  475. , c = 0;
  476. if (t[1]) {
  477. var l = t[1].split(":");
  478. a = parseInt(l[0], 10),
  479. o = parseInt(l[1], 10),
  480. c = parseInt(l[2], 10)
  481. }
  482. var h = new Date(i, r, s, a, o, c);
  483. return h
  484. },
  485. compareTime: function (e, t) {
  486. var n = this
  487. , i = n.formatTime(e)
  488. , r = n.formatTime(t)
  489. , s = i.getTime() - r.getTime();
  490. return s
  491. }
  492. };
  493. Date.prototype.Format = function (e) {
  494. var t = {
  495. "M+": this.getMonth() + 1,
  496. "d+": this.getDate(),
  497. "h+": this.getHours(),
  498. "m+": this.getMinutes(),
  499. "s+": this.getSeconds(),
  500. "q+": Math.floor((this.getMonth() + 3) / 3),
  501. S: this.getMilliseconds()
  502. };
  503. for (var n in /(y+)/.test(e) && (e = e.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length))),
  504. t)
  505. new RegExp("(" + n + ")").test(e) && (e = e.replace(RegExp.$1, 1 == RegExp.$1.length ? t[n] : ("00" + t[n]).substr(("" + t[n]).length)));
  506. return e
  507. }
  508. !function (e) {
  509. "use strict";
  510. var t = function (t, n) {
  511. this.container = e(t),
  512. this.handler = this.container.find(".slider__handler"),
  513. this.track = this.container.find(".slider__track"),
  514. this.track__checked = this.container.find(".track__checked"),
  515. this.style__type = e(t).attr("type"),
  516. this.maxmin = e(t).attr("maxmin"),
  517. this.bind(),
  518. "function" == typeof n && (this.callback = n)
  519. };
  520. t.prototype.bind = function () {
  521. this.container.on(e.touchEvents.start, e.proxy(this.touchStart, this)).on(e.touchEvents.end, e.proxy(this.touchEnd, this)),
  522. e(document.body).on(e.touchEvents.move, e.proxy(this.touchMove, this)).on(e.touchEvents.end, e.proxy(this.touchEnd, this))
  523. }
  524. ,
  525. t.prototype.touchStart = function (t) {
  526. t.preventDefault(),
  527. this.handler = this.container.find(window.slider__handler ? window.slider__handler : ".slider__handler"),
  528. this.start = e.getTouchPosition(t),
  529. this.width = this.track.width(),
  530. this.height = this.track.height(),
  531. this.left = Number(this.handler.css("left").split("px")[0]),
  532. this.bottom = Number(this.handler.css("bottom").split("px")[0]),
  533. this.touching = !0
  534. }
  535. ,
  536. t.prototype.touchMove = function (t) {
  537. if (!this.touching || this.container.find(".slider__handler").length > 1 && !window.slider__handler)
  538. return !0;
  539. var n = e.getTouchPosition(t);
  540. if ("1" == this.style__type) {
  541. var i = this.start.y - n.y
  542. , r = i + this.bottom
  543. , s = r / this.height * 100;
  544. this.width = this.height;
  545. var a = "bottom"
  546. } else
  547. i = n.x - this.start.x,
  548. r = i + this.left,
  549. s = r / this.width * 100,
  550. a = "left";
  551. if (s < 0 && (s = 0),
  552. s > 100 && (s = 100),
  553. window.slider__handler && window.slider__handler.indexOf(".slider__handler.left") > -1) {
  554. var o = this.container.find(".slider__handler.center").length > 0 ? Number(this.container.find(".slider__handler.center").css(a).split("px")[0]) / this.width * 100 : this.container.find(".slider__handler.right").length > 0 ? Number(this.container.find(".slider__handler.right").css(a).split("px")[0]) / this.width * 100 : 100;
  555. "1" == this.style__type ? ("no" != this.maxmin && s > o && (s = o),
  556. this.handler.css("bottom", s + "%"),
  557. this.track__checked.css("bottom", s + "%")) : ("no" != this.maxmin && s > o && (s = o),
  558. this.handler.css("left", s + "%"),
  559. this.track__checked.css("left", s + "%"))
  560. } else if (window.slider__handler && window.slider__handler.indexOf(".slider__handler.right") > -1) {
  561. var c = this.container.find(".slider__handler.center").length > 0 ? Number(this.container.find(".slider__handler.center").css(a).split("px")[0]) / this.width * 100 : this.container.find(".slider__handler.left").length > 0 ? Number(this.container.find(".slider__handler.left").css(a).split("px")[0]) / this.width * 100 : 0;
  562. "1" == this.style__type ? ("no" != this.maxmin && s < c && (s = c),
  563. this.handler.css("bottom", s + "%"),
  564. this.track__checked.css("top", 100 - s + "%")) : ("no" != this.maxmin && s < c && (s = c),
  565. this.handler.css("left", s + "%"),
  566. this.track__checked.css("right", 100 - s + "%"))
  567. } else if (window.slider__handler && window.slider__handler.indexOf(".slider__handler.center") > -1) {
  568. c = this.container.find(".slider__handler.left").length > 0 ? Number(this.container.find(".slider__handler.left").css(a).split("px")[0]) / this.width * 100 : 0,
  569. o = this.container.find(".slider__handler.right").length > 0 ? Number(this.container.find(".slider__handler.right").css(a).split("px")[0]) / this.width * 100 : 100;
  570. s < c ? s = c : s > o && (s = o),
  571. "1" == this.style__type ? this.handler.css("bottom", s + "%") : this.handler.css("left", s + "%")
  572. } else
  573. "1" == this.style__type ? (this.handler.css("top", s + "%"),
  574. this.track__checked.css("height", s + "%")) : (this.handler.css("left", s + "%"),
  575. this.track__checked.css("width", s + "%"));
  576. this.callback && this.callback.call(this, s),
  577. this.container.trigger("change", s)
  578. }
  579. ,
  580. t.prototype.touchEnd = function (e) {
  581. window.slider__handler && setTimeout(function () {
  582. delete window.slider__handler
  583. }, 100),
  584. this.touching && (this.touching = !1)
  585. }
  586. ,
  587. e.fn.setslider = function (n) {
  588. this.each(function () {
  589. var i = e(this)
  590. , r = "setslider"
  591. , s = i.data(r);
  592. if (s)
  593. return s;
  594. i.data(r, new t(this, n))
  595. })
  596. }
  597. }($);