1////////////////////////////////////////////////////// 2(function (a, b, c, d) { 3 var e = a(b); a.fn.lazyload = function (c) { 4 function i() { var b = 0; f.each(function () { var c = a(this); if (h.skip_invisible && !c.is(":visible")) return; if (!a.abovethetop(this, h) && !a.leftofbegin(this, h)) if (!a.belowthefold(this, h) && !a.rightoffold(this, h)) c.trigger("appear"), b = 0; else if (++b > h.failure_limit) return !1 }) } var f = this, g, 5h = { threshold: 0, failure_limit: 0, event: "scroll", effect: "show", container: b, data_attribute: "original", skip_invisible: !0, appear: null, load: null }; 6 return c && (d !== c.failurelimit && (c.failure_limit = c.failurelimit, delete c.failurelimit), d !== c.effectspeed && (c.effect_speed = c.effectspeed, delete c.effectspeed), a.extend(h, c)), g = h.container === d || h.container === b ? e : a(h.container), 0 === h.event.indexOf("scroll") && g.bind(h.event, function (a) { return i() }), this.each(function () { var b = this, c = a(b); b.loaded = !1, c.one("appear", function () { if (!this.loaded) { if (h.appear) { var d = f.length; h.appear.call(b, d, h) } a("<img />").bind("load", function () { c.hide().attr("src", c.data(h.data_attribute))[h.effect](h.effect_speed), b.loaded = !0; var d = a.grep(f, function (a) { return !a.loaded }); f = a(d); if (h.load) { var e = f.length; h.load.call(b, e, h) } }).attr("src", c.data(h.data_attribute)) } }), 0 !== h.event.indexOf("scroll") && c.bind(h.event, function (a) { b.loaded || c.trigger("appear") }) }), e.bind("resize", function (a) { i() }), /iphone|ipod|ipad.*os 5/gi.test(navigator.appVersion) && e.bind("pageshow", function (b) { b.originalEvent.persisted && f.each(function () { a(this).trigger("appear") }) }), a(b).load(function () { i() }), this 7 }, a.belowthefold = function (c, f) { var g; return f.container === d || f.container === b ? g = e.height() + e.scrollTop() : g = a(f.container).offset().top + a(f.container).height(), g <= a(c).offset().top - f.threshold }, a.rightoffold = function (c, f) { var g; return f.container === d || f.container === b ? g = e.width() + e.scrollLeft() : g = a(f.container).offset().left + a(f.container).width(), g <= a(c).offset().left - f.threshold }, a.abovethetop = function (c, f) { var g; return f.container === d || f.container === b ? g = e.scrollTop() : g = a(f.container).offset().top, g >= a(c).offset().top + f.threshold + a(c).height() }, a.leftofbegin = function (c, f) { var g; return f.container === d || f.container === b ? g = e.scrollLeft() : g = a(f.container).offset().left, g >= a(c).offset().left + f.threshold + a(c).width() }, a.inviewport = function (b, c) { return !a.rightoffold(b, c) && !a.leftofbegin(b, c) && !a.belowthefold(b, c) && !a.abovethetop(b, c) }, a.extend(a.expr[":"], { "below-the-fold": function (b) { return a.belowthefold(b, { threshold: 0 }) }, "above-the-top": function (b) { return !a.belowthefold(b, { threshold: 0 }) }, "right-of-screen": function (b) { return a.rightoffold(b, { threshold: 0 }) }, "left-of-screen": function (b) { return !a.rightoffold(b, { threshold: 0 }) }, "in-viewport": function (b) { return a.inviewport(b, { threshold: 0 }) }, "above-the-fold": function (b) { return !a.belowthefold(b, { threshold: 0 }) }, "right-of-fold": function (b) { return a.rightoffold(b, { threshold: 0 }) }, "left-of-fold": function (b) { return !a.rightoffold(b, { threshold: 0 }) } }) 8})(jQuery, window, document) 9////////////////////////////////////////////////////// 10 11var ieVersion = function () { 12 var ver = 100, 13 ie = (function () { 14 var undef, 15 v = 3, 16 div = document.createElement('div'), 17 all = div.getElementsByTagName('i'); 18 while ( 19 div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->', 20 all[0] 21 ); 22 return v > 4 ? v : undef; 23 } ()); 24 if (ie) ver = ie; 25 return ver; 26} 27 28window.alert = function (font) { 29 layer.open({ 30 title:'æç¤º' 31 ,skin: 'msg' 32 ,content: font 33 ,btnAlign: 'c' //æé®å± ä¸ 34 ,shade: 0 //䏿¾ç¤ºé®ç½© 35 ,btn: 'ç¡®å®' 36 //time: 2 37 }); 38 //pub.clearTipStyle(false); 39} 40 41var isIe = (window.ActiveXObject) ? true : false;
42//å¼¹åºçª 43 44/*å¼¹åºç»éçªå£*/ 45var isIE6 = ieVersion() == "6"; 46(function ($) { 47 $.fn.decorateIframe = function (options) { 48 49 if (isIE6) { 50 var opts = $.extend({}, $.fn.decorateIframe.defaults, options); 51 $(this).each(function () { 52 var $myThis = $(this); 53 //å建ä¸ä¸ªIFRAME 54 var divIframe = $("<iframe style=\"border:none\" />"); 55 divIframe.attr("id", opts.iframeId); 56 divIframe.css({ "position": "absolute", "display": "block", "z-index": opts.iframeZIndex, "top": 0, "left": 0 }); 57 if (opts.width == 0) { 58 divIframe.css("width", $myThis.width() + parseInt($myThis.css("padding")) * 2 + "px"); 59 } 60 if (opts.height == 0) { 61 divIframe.css("height", $myThis.height() + parseInt($myThis.css("padding")) * 2 + "px"); 62 } 63 divIframe.css("filter", "mask(color=#fff)"); 64 $myThis.append(divIframe); 65 }); 66 } 67 } 68 $.fn.decorateIframe.defaults = { 69 iframeId: "decorateIframe1", 70 iframeZIndex: -1, 71 width: 0, 72 height: 0 73 } 74})(jQuery); 75 76(function ($) { 77 $.fn.popwindow = function (cssOptions,data) { 78 $("#Overlay").fadeOut().remove(); 79 var cssOptions = $.extend({}, cssOptions); 80 81 if (this.context) { 82 $(this).click(function () { 83 open(this); 84 return false; 85 }); 86 } else { 87 open(null); 88 } 89 90 function open(e) { 91 html = []; 92 html.push(); 93 94 var url = ""; 95 if (typeof(data.href)!="undefined") { 96 url = data.href; 97 } 98 99 100 html.push("<div id=\"Overlay\">"); 101 if (cssOptions.title) { 102 html.push("<div class=\"KmainBox\">"); 103 html.push("<h2 class=\"msgboxhead\">"); 104 html.push(" <span>" + cssOptions.title + "</span> "); 105 html.push(" <a style=\"color: #fff;\" href=\"#\" class=\"close\">å ³é</a></h2>"); 106 } 107 if(url.length>0) 108 { 109 html.push("<iframe id=\"LoadedContent\" frameborder=\"0\"></iframe>"); 110 } 111 else 112 { 113 html.push("<div id=\"LoadedContent\" frameborder=\"0\"></div>"); 114 } 115 if (cssOptions.title) { 116 html.push("</div>"); 117 } 118 html.push("</div>"); 119 $("body").prepend(html.join("")); 120 121 if (!data.noOverlayClose) { 122 $("#Overlay").click(function () { $(this).remove(); }); 123 } 124 $("#Overlay").decorateIframe(); 125 var $LoadedContent = $("#LoadedContent"); 126 127 // url += "&t=" + Math.random(); 128 if(url.length>0) 129 { 130 $LoadedContent.attr("src", url); 131 } 132 else 133 { 134 $LoadedContent.html(data.html); 135 } 136 137 $("#Overlay").children().eq(0).css(cssOptions); 138 windowresize(); 139 140 $("#Overlay .close").click(function () { 141 $("#Overlay").fadeOut().remove(); 142 return false; 143 }); 144 } 145 } 146 147 $.fn.popwindow.close = function () { 148 $("#Overlay").fadeOut().remove(); 149 150 } 151 152 $.fn.popwindow.resize = function (css) { 153 $("#LoadedContent").css(css); 154 } 155 156 157 function windowresize() { 158 var $LoadedContent = $("#LoadedContent"); 159 160 if($LoadedContent.length>0) 161 { 162 if (isIE6) { 163 $("body").css("position", "static"); 164 $("#Overlay").css({ 165 position: "absolute", 166 width: $(window).width(), 167 height: $(window).height(), 168 top: $(window).scrollTop() 169 }); 170 $(window).scroll(function () { 171 172 $("#Overlay").css({ top: $(window).scrollTop() }); 173 }); 174 } else { 175 $("#Overlay").css({ position: "fixed" }); 176 } 177 var position = { 178 marginLeft: ($(window).width() - $LoadedContent.width()) / 2, //272 179 marginTop: ($(window).height() - $LoadedContent.height()) / 2 180 }; 181 182 $("#Overlay").children().eq(0).css(position); 183 } 184 } 185 $(window).resize(windowresize); 186})(jQuery); 187 188 189//divæ»å¨ 190(function ($) { 191 $.fn.slideBox = function (options) { 192 var defaults = { duration: 3000, delay: 5000, speed: 500, effect: "fade" }; 193 var opts = $.extend(defaults, options || {}); 194 var obj = $(this); 195 var currentIndex = 1; 196 var isDone = true; 197 var myPlayInterval; 198 var myPlayTimeOut; 199 var start = function () { window.clearInterval(myPlayInterval); myPlayTimeOut = window.setTimeout(goAutoPlayBox, opts.duration); } 200 var goAutoPlayBox = function () { 201 myPlayInterval = window.setInterval(function () { 202 var itemCount = $(".playPages .page", obj).length; 203 var nextIndex = currentIndex < itemCount ? currentIndex * 1 + 1 : 1; 204 yPlayMove("next", nextIndex); 205 }, opts.duration); 206 } 207 var yPlayMove = function (nextOrPre, nextIndex) { 208 if (isDone && currentIndex != nextIndex) { 209 window.clearInterval(myPlayInterval); 210 window.clearTimeout(myPlayTimeOut); 211 isDone = false;
212 var item = $(".playPages .page[pageNum='" + currentIndex + "']", obj); 213 var width = $(item).width(); 214 var height = $(item).height(); 215 var itemLeft = "-" + width + "px"; 216 var itemTop = "-" + height + "px"; 217 var nextItemLeft = width + "px"; 218 var nextItemTop = height + "px"; 219 if (nextOrPre == "pre") { 220 itemLeft = width + "px"; 221 nextItemLeft = "-" + width + "px"; 222 } 223 224 var nextItem = $(".playPages .page[pageNum='" + nextIndex + "']", obj); 225 currentIndex = nextIndex; 226 $(".playPageNums .item", obj).removeClass("curr"); 227 $(".playPageNums .item[pageNum='" + currentIndex + "']", obj).addClass("curr"); 228 229 if (opts.effect == "top") {//å䏿»å¨ 230 item.animate({ top: itemTop }, opts.speed, function () { item.css({ "top": "0px" }).hide() }) 231 nextItem.css({ top: nextItemTop }).show().animate({ top: "0px" }, opts.speed, function () { isDone = true; start(); }) 232 } else if (opts.effect == "fade") {//fadeææ 233 item.fadeOut(opts.speed).css({ "left": "0px" }); 234 nextItem.css({ "left": "0px" }).fadeIn(opts.speed, function () { isDone = true; start(); }) 235 } else {//æ°´å¹³ 236 item.animate({ left: itemLeft }, opts.speed, function () { item.css({ "left": "0px" }).hide() }) 237 nextItem.css({ left: nextItemLeft }).show().animate({ left: "0px" }, opts.speed, function () { isDone = true; start(); }) 238 } 239 } 240 } 241 var init = function () { 242 $(obj).on("mouseover click", ".playPageNums .item", function () { 243 var pageIndex = $(this).attr("pageNum"); 244 var nextOrPre = pageIndex > currentIndex ? "next" : "pre"; 245 window.clearInterval(myPlayInterval); 246 window.clearTimeout(myPlayTimeOut); 247 if (pageIndex != currentIndex) 248 { 249 yPlayMove(nextOrPre, pageIndex); 250 } 251 }) 252 253 var btnnext = $(".btnnext", obj); 254 if (btnnext.length > 0) { 255 $(".btnnext", obj).click(function () { 256 var itemCount = $(".playPages .page", obj).length; var nextIndex = currentIndex < itemCount ? currentIndex * 1 + 1 : 1; yPlayMove("next", nextIndex); 257 return false; 258 }); 259 } 260 var btnprev = $(".btnprev", obj); 261 if (btnprev.length > 0) { 262 263 $(".btnprev", obj).click(function () { 264 var itemCount = $(".playPages .page", obj).length; var nextIndex = currentIndex > 1 ? currentIndex * 1 - 1 : itemCount; yPlayMove("pre", nextIndex); 265 266 }); 267 } 268 $(".page", obj).hover(function () { 269 window.clearInterval(myPlayInterval); window.clearTimeout(myPlayTimeOut); }, function () { start(); }) 270 271 if ($(".playPages", obj).length > 0) { 272 myPlayTimeOut = window.setTimeout(start, opts.delay); 273 274 } 275 } 276 $(function () { init(); }); 277 278 } 279 280 $.fn.CBDhover = function (options) { 281 var defaults = { hoverTime: 200, outTime: 200, hover: function (dom) { $.noop(); }, out: function (dom) { $.noop(); } }; 282 var sets = $.extend(defaults, options || {}); 283 var hoverTimer, outTimer; 284 return $(this).each(function () { 285 $(this).hover(function () { 286 clearTimeout(outTimer); 287 var current = $(this); 288 hoverTimer = setTimeout(function () { sets.hover(current); }, sets.hoverTime); 289 }, 290 function () { 291 clearTimeout(hoverTimer); 292 var current = $(this); 293 outTimer = setTimeout(function () { sets.out(current); }, sets.outTime); 294 }); 295 }); 296 }, 297 $.fn.imgScroll = function (options) { 298 return this.each(function () { 299 300 var e = $.extend({ showItemCount: 5, speed: 300 }, options); 301 var itemBox = $(this); 302 var ul = $("ul", itemBox); 303 var lis = $("li", ul); 304 var lisCount = lis.length; 305 var isInAnmate = false; 306 if (lisCount > 0) { 307 //ææ°æ® 308 var itemWidth = parseInt($(lis[0]).outerWidth()); 309 var ULwidth = itemWidth * lis.length; 310 ul.css({ width: ULwidth + "px" }); 311 var displayWidth = e.showItemCount * itemWidth; 312 313 $(".prev", itemBox).click(function () { //å左移 314 if ($(this).hasClass("disable")) { 315 return; 316 } 317 318 if (isInAnmate) 319 return; 320 321 var currentLeft = parseInt($(ul).css("left")); 322 currentLeft= isNaN(currentLeft)?0:currentLeft; 323 var left = e.showItemCount * itemWidth; 324 var goLeft = currentLeft + left; 325 326 if (goLeft <= 0) { 327 isInAnmate = true; 328 ul.animate({ left: goLeft + "px" }, e.speed, function () { checkBtn(); isInAnmate = false; }) 329 } 330 331 }) 332 333 $(".next", itemBox).click(function () { //å左移 334 335 if ($(this).hasClass("disable")) { 336 return; 337 } 338 if (isInAnmate) 339 return; 340 var currentLeft = parseInt($(ul).css("left")); 341 currentLeft= isNaN(currentLeft)?0:currentLeft; 342 var left = displayWidth; 343 var goLeft = (currentLeft + (left * -1)); 344 345 if (ULwidth > (goLeft * -1)) { 346 347 348 isInAnmate = true; 349 ul.animate({ left: goLeft + "px" }, e.speed, function () { checkBtn(); isInAnmate = false; }) 350 } 351 352 }) 353 354 function checkBtn() { 355 356 var currentLeft = parseInt($(ul).css("left")); 357 currentLeft=isNaN(currentLeft)?0:currentLeft; 358 359 if (currentLeft == 0) { 360 $(".prev", itemBox).addClass("disable"); 361 362 } 363 else { 364 $(".prev", itemBox).removeClass("disable"); 365 } 366 367 if (ULwidth - (currentLeft * -1) <= displayWidth) { 368 $(".next", itemBox).addClass("disable"); 369 } 370 else { 371 $(".next", itemBox).removeClass("disable"); 372 } 373 } 374 375 checkBtn(); 376 377 } 378 379 }) 380 } 381})(jQuery); 382 383 384// $("#scrollDiv").TxtScroll({ line: 1, speed: 500, timer: 3000, up: "", down: "" }); 385(function ($) { 386 $.fn.extend({ 387 TxtScroll: function (opt, callback) { 388 //åæ°åå§å 389 if (!opt) var opt = {}; 390 var _btnUp = $("#" + opt.up); //Shawphy:åä¸æé® 391 var _btnDown = $("#" + opt.down); //Shawphy:åä¸æé® 392 var timerID; 393 var _this = this.eq(0).find("ul:first"); 394 var lineH = _this.find("li:first").height(), //è·åè¡é« 395 line = opt.line ? parseInt(opt.line, 10) : parseInt(this.height() / lineH, 10), //æ¯æ¬¡æ»å¨çè¡æ°ï¼é»è®¤ä¸ºä¸å±ï¼å³ç¶å®¹å¨é«åº¦ 396 speed = opt.speed ? parseInt(opt.speed, 10) : 500; //å·å¨éåº¦ï¼æ°å¼è¶å¤§ï¼éåº¦è¶æ ¢ï¼æ¯«ç§ï¼ 397 timer = opt.timer //?parseInt(opt.timer,10):3000; //æ»å¨çæ¶é´é´éï¼æ¯«ç§ï¼ 398 if (line == 0) line = 1; 399 var upHeight = 0 - line * lineH; 400 //æ»å¨å½æ° 401 var scrollUp = function () { 402 _btnUp.unbind("click", scrollUp); //Shawphy:åæ¶å䏿é®ç彿°ç»å® 403 _this.animate({ 404 marginTop: upHeight 405 }, speed, function () { 406 for (i = 1; i <= line; i++) { 407 _this.find("li:first").appendTo(_this); 408 } 409 _this.css({ marginTop: 0 }); 410 _btnUp.bind("click", scrollUp); //Shawphy:ç»å®å䏿é®çç¹å»äºä»¶ 411 }); 412 413 } 414 //Shawphy:åä¸ç¿»é¡µå½æ° 415 var scrollDown = function () { 416 _btnDown.unbind("click", scrollDown); 417 for (i = 1; i <= line; i++) { 418 _this.find("li:last").show().prependTo(_this); 419 } 420 _this.css({ marginTop: upHeight }); 421 _this.animate({ 422 marginTop: 0 423 }, speed, function () { 424 _btnDown.bind("click", scrollDown); 425 }); 426 } 427 //Shawphy:èªå¨ææ¾ 428 var autoPlay = function () { 429 if (timer) timerID = window.setInterval(scrollUp, timer); 430 }; 431 var autoStop = function () { 432 if (timer) window.clearInterval(timerID); 433 }; 434 //é¼ æ äºä»¶ç»å® 435 _this.hover(autoStop, autoPlay).mouseout(); 436 _btnUp.css("cursor", "pointer").click(scrollUp).hover(autoStop, autoPlay); //Shawphy:åä¸åä¸é¼ æ äºä»¶ç»å® 437 _btnDown.css("cursor", "pointer").click(scrollDown).hover(autoStop, autoPlay); 438 439 } 440 }) 441})(jQuery); 442function ClosePop() { 443 444 $("#Overlay,#dailog").fadeOut().remove(); 445 446 447} 448 449 450var CBDtools = { 451 //**************************************************************************************************cookie
451sæä½ 452 //value:Cookieçå¼ï¼expiresMMï¼æææ¶é´ï¼è¿ææ¶é´--åéï¼,name:åç§°ï¼å¿ å¡«ï¼,key:é® å¯ä»¥ä¸è¾å ¥æä¸ºç©º 453 //encodeURI==>Server.URLEncode 454 setCookie: function (value, expiresMM, name, key) { 455 456 var exp = new Date(); 457 exp.setTime(exp.getTime() + expiresMM * 60 * 1000); 458 if (key == null || key == "") { 459 document.cookie = name + "=" + encodeURI(value) + ";expires=" + exp.toGMTString() + ";path=/"; 460 } 461 else { 462 var nameValue = this.getCookie(name); 463 if (nameValue == "") { 464 document.cookie = name + "=" + key + "=" + encodeURI(value) + ";expires=" + exp.toGMTString() + ";path=/"; 465 } 466 else { 467 var keyValue = this.getCookie(name, key); 468 if (keyValue != "") { 469 nameValue = nameValue.replace(key + "=" + keyValue, key + "=" + encodeURI(value)); 470 document.cookie = name + "=" + nameValue + ";expires=" + exp.toGMTString() + ";path=/"; 471 } 472 else { 473 document.cookie = name + "=" + nameValue + "&" + key + "=" + encodeURI(value) + ";expires=" + exp.toGMTString() + ";path=/"; 474 } 475 } 476 } 477 }, 478 //读åcookies 479 getCookie: function (name, key) { 480 var nameValue = ""; 481 var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)"); 482 if (arr = document.cookie.match(reg)) { 483 nameValue = decodeURI(arr[2]); 484 } 485 if (key != null && key != "") { 486 reg = new RegExp("(^| |&)" + key + "=([^(;|&|=)]*)(&|$)"); 487 if (arr = nameValue.match(reg)) { 488 489 return decodeURI(arr[2]); 490 491 } 492 else return ""; 493 } 494 else { 495 return nameValue; 496 } 497 }, 498 //å é¤cookies 499 delCookie: function (name) { 500 var exp = new Date(); 501 exp.setTime(exp.getTime() - 1); 502 var cval = this.getCookie(name); 503 if (cval != null) document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString(); 504 }, 505 //**************************************************************************************************cookiesæä½ 506 //URLåæ° 507 getParam: function (paras) { 508 var url = location.href; 509 var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&"); 510 var paraObj = {} 511 for (i = 0; j = paraString[i]; i++) { 512 paraObj[j.substring(0, j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=") + 1, j.length); 513 } 514 var returnValue = paraObj[paras.toLowerCase()]; 515 if (typeof (returnValue) == "undefined") { 516 return ""; 517 } else { 518 return returnValue; 519 } 520 }, 521 //å è½½JSæä»¶ 522 loadScript: function (script_filename) {
523 document.write('<' + 'script'); 524 document.write(' language="javascript"'); 525 document.write(' type="text/javascript"'); 526 document.write(' src="' + script_filename + '">'); 527 document.write('</' + 'script' + '>'); 528 }, 529 //çæ¯ç¼©å°å¾ç 530 DrawImage: function (ImgD, FitWidth, FitHeight) { 531 var image = new Image(); 532 image.src = ImgD.src; 533 if (image.width > 0 && image.height > 0) { 534 if (image.width / image.height >= FitWidth / FitHeight) { 535 if (image.width > FitWidth) { 536 ImgD.width = FitWidth; 537 ImgD.height = (image.height * FitWidth) / image.width; 538 } else { 539 ImgD.width = image.width; 540 ImgD.height = image.height; 541 } 542 } 543 else { 544 if (image.height > FitHeight) { 545 ImgD.height = FitHeight; 546 ImgD.width = (image.width * FitHeight) / image.height; 547 } else { 548 ImgD.width = image.width; 549 ImgD.height = image.height; 550 } 551 } 552 } 553 }, 554 555 OpenWindow: function (_href, _width, _height, _title, _noOverlayBoxClose,_html) { 556 557 $.fn.popwindow({ width: _width, height: _height, title: _title },{href: _href,noOverlayClose: _noOverlayBoxClose,html:_html}); 558 }, 559 CloseWindow: function () { 560 561 $.fn.popwindow.close(); 562 } 563} 564 565function closeWindowBase(windowId) { 566 $("#" + windowId).remove(); 567} 568function closeWindow() { 569 closeWindowBase("mesWindow") 570} 571 572 573 574 575 576 577 578function CBDtogglePop(Trigger, Parent, ParentToggleClass, Target) { 579 $(document).delegate(Trigger, "mouseenter", function () { var h = $(this), g = h.parents(Parent), f = g.siblings(), e = g.find(Target); clearTimeout(g[0].timer); g[0].timer = null; clearTimeout(h[0].atimer); h[0].atimer = null; h[0].atimer = setTimeout(function () { f.removeClass(ParentToggleClass); g.addClass(ParentToggleClass); e.show() }, 200) }); 580 $(document).delegate(Target, "mouseenter", function () { var e = $(this), g = e.parents(Parent), f = g.siblings(); clearTimeout(g[0].timer); g[0].timer = null; f.removeClass(ParentToggleClass); g.addClass(ParentToggleClass); }); 581 $(document).delegate(Target, "mousemove", function () { var e = $(this), g = e.parents(Parent), f = g.siblings(); clearTimeout(g[0].timer); g[0].timer = null; f.removeClass(ParentToggleClass); g.addClass(ParentToggleClass); }); 582 $(document).delegate(Trigger, "mouseleave", function () { var g = $(this), f = g.parents(Parent), e = f.find(Target); clearTimeout(g[0].atimer); g[0].atimer = null; clearTimeout(f[0].timer); f[0].timer = null; f[0].timer = setTimeout(function () { e.hide(); f.removeClass(ParentToggleClass) }, 100) }); 583 $(document).delegate(Target, "mouseleave", function () { var e = $(this), f = e.parents(Parent); clearTimeout(f[0].timer); f[0].timer = null; f[0].timer = setTimeout(function () { e.hide(); f.removeClass(ParentToggleClass) }, 100) }) 584} 585 586function scrollToObject(obj) { 587 588 var target = $(obj); 589 590 if (target.length == 0) { 591 return; 592 } 593 var top = target.offset().top - 20; 594 $("html, body").animate({ scrollTop: top + "px" }, { duration: 200, easing: "swing" }); 595 596 var row = target.parents(".form-row"); 597 598 if (row.length > 0) { 599 600 for (var i = 0; i < 4; i++) { 601 602 window.setTimeout(function () { 603 if (row.hasClass("row-error-style")) { 604 row.removeClass("row-error-style") 605 } 606 else { 607 608 row.addClass("row-error-style") 609 } 610 }, (i + 1) * 500); 611 } 612 613 614 } 615} 616 617$(document).on("keyup", ".txt-letter-counter", function () { 618 619 var tipID = $(this).attr("tipid"); 620 if (tipID.length > 0) 621 { 622 var max = $(this).attr("maxlength"); 623 624 if (max.length > 0) 625 { 626 var value = $(this).val(); 627 if (value.length > 0) { 628 $("#" + tipID).html("å·²ç»è¾å ¥" + value.length + "å,请æ§å¶å¨"+max+"å以å ") 629 } 630 else { 631 $("#" + tipID).html( max + "å以å ") 632 } 633 634 } 635 } 636}) 637 638 639$.fn.checkCharLength = function (errContent) { 640 var $this = $(this); 641 $this.change(function (event) { 642 var curLength = $this.val().length; 643 var maxlength = $this.attr('maxlength'); 644 if (curLength > maxlength) { 645 $this.val($.trim($this.val()).substr(0, maxlength)).trigger('change'); 646 return; 647 } 648 $(errContent).text(maxlength - curLength).parent().toggleClass('red', curLength > maxlength); 649 }).keyup(function () { 650 $this.trigger('change') 651 }); 652 if ($.trim($this.val()) != '') { 653 $this.trigger('change') 654 } 655} 656
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.