| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- var qrcode = new QRCode(document.getElementById("qrcode"), {
- width: 100,
- height: 100
- });
- // url生成二维码
- if($(".az_code_right").length>0){
- var qrcode_title = new QRCode(document.getElementById("qrcode_title"), {
- width : 100,
- height : 100
- });
-
- }
- $(function () {
- var p_text1 = $("#code_url").text();
- if($(".az_code_right").length>0){
- qrcode_title.makeCode(p_text1);
- }
- $(".public_nav li").removeClass('current_page').eq(1).addClass('current_page');
- $("#J_rank_list").load('/Layout/gameRankList');
- });
- // 安卓下载按钮
- $(".az_code_right .az_ed_download").hover(function () {
- $(".az_ed_download img").attr("src", "/static/images/home/az-white.png");
- }, function () {
- $(".az_ed_download img").attr("src", "/static/images/home/SVG-07.png");
- });
- $(".az_no_link .az_no_download").hover(function () {
- $(".az_no_download img").attr("src", "/static/images/home/az-white.png");
- }, function () {
- $(".az_no_download img").attr("src", "/static/images/home/SVG-19.png");
- });
- $(".az_no_download").click(function () {
- $(".warp_no_download_popup").show();
- })
- // 手游排行控件显示隐藏
- $(function () {
- $('.rank_list>div').eq(0).find('.big').show()
- $('.rank_list>div').eq(0).find('.small').hide()
- $('.rank_list').hover(function () {
- $('.rank_list>div').hover(function () {
- $(this).find('.big').show().parent().siblings().find('.big').hide();
- $(this).find('.small').hide().parent().siblings().find('.small').show();
- });
- });
- })
- // 判断截图是否超过框
- setTimeout(function () {
- if($(".outer").length>0){
- var c = $('.image-slider-contents').width();
- var d = $(".contents-wrapper .outer:last").attr('class');
- var array = d.split(" ");
- var e = array[0];
- var w = (e * 268) + (15 * (e - 1));
- $(".contents-wrapper .outer:last").css("margin-right", "0px")
- $(".contents-wrapper").css("width", w);
- var b = $(".contents-wrapper").width();
- if (b <= c) {
- $(".image-slider-back,.image-slider-forward").css("cssText", "display:none !important;")
- } else {
- $(".contents-wrapper").css("width", w);
- }
- }
- }, 500);
- // 游戏截图轮番图
- $(document).ready(function () {
- var a = $('.image-slider-contents').width();
- $('.image-slider-contents').on('scroll', function () {
- if ($(this).scrollLeft() === 0) {
- $(".image-slider-back").css("background", "url(/static/images/home/left-gray.png)");
- $(".image-slider-forward").css("background", "url(/static/images/home/right.png)");
- } else if (($(this).width() + $(this).scrollLeft()) === $('.contents-wrapper').width()) {
- $(".image-slider-back").css("background", "url(/static/images/home/left.png)");
- $(".image-slider-forward").css("background", "url(/static/images/home/right-gray.png)");
- } else {
- $(".image-slider-back").css("background", "url(/static/images/home/left.png)");
- $(".image-slider-forward").css("background", "url(/static/images/home/right.png)");
- }
- });
- var isrightclick = true;
- $(".image-slider-forward").on("click", function () {
- if (isrightclick) {
- isrightclick = false;
- $('.image-slider-contents').animate({ scrollLeft: $('.image-slider-contents').scrollLeft() + a }, 500);
- setTimeout(function () {
- isrightclick = true;
- }, 500);
- }
- });
- var isleftclick = true;
- $(".image-slider-back").on("click", function () {
- if (isleftclick) {
- isleftclick = false;
- $('.image-slider-contents').animate({ scrollLeft: $('.image-slider-contents').scrollLeft() - a }, 500);
- setTimeout(function () {
- isleftclick = true;
- }, 500);
- }
- });
- });
- // 点击放大图其他位置隐藏
- $(document).click(function (e) {
- var target = $(e.target);
- if (target.closest(".img-large").length != 0) return;
- $(".preview").hide();
- $('.preview .img-large img').removeAttr('class');
- })
- //判断截图是否超过1张
- setTimeout(function () {
- if (!$('.image-slider-contents .outer').hasClass('2')) {
- $(".left").hide();
- $(".right").hide();
- }
- }, 200)
|