index.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // 手游排行控件显示隐藏
  2. $(function () {
  3. $('.rank_list>div').eq(0).find('.big').show()
  4. $('.rank_list>div').eq(0).find('.small').hide()
  5. $('.rank_list').hover(function () {
  6. $('.rank_list>div').hover(function () {
  7. $(this).find('.big').show().parent().siblings().find('.big').hide();
  8. $(this).find('.small').hide().parent().siblings().find('.small').show();
  9. });
  10. });
  11. })
  12. $(function () {
  13. $(".public_nav li").removeClass('current_page').eq(2).addClass('current_page');
  14. $("#J_recommend_gift").load('/Layout/gameRankList');
  15. });
  16. //url转二维码
  17. if($("#qrcode").length>0){
  18. var qrcode = new QRCode(document.getElementById("qrcode"), {
  19. width : 100,
  20. height : 100
  21. });
  22. }
  23. // url生成二维码
  24. if($(".az_code_right").length>0){
  25. var qrcode_title = new QRCode(document.getElementById("qrcode_title"), {
  26. width : 100,
  27. height : 100
  28. });
  29. }
  30. if($(".az_code_de").length>0){
  31. var qrcode_tit = new QRCode(document.getElementById("qrcode_tit"), {
  32. width : 100,
  33. height : 100
  34. });
  35. }
  36. $(function () {
  37. var p_text = $("#code_url").text();
  38. if($(".az_code_right").length>0){
  39. qrcode_title.makeCode(p_text);
  40. }
  41. if($(".az_code_de").length>0){
  42. qrcode_tit.makeCode(p_text);
  43. }
  44. });
  45. // 设置默认游戏icon
  46. $(".content_left img,.hot_news_img img").error(function () {
  47. $(this).attr("src", "/static/images/icon/990-625.png");
  48. })
  49. // 安卓下载按钮
  50. $(".az_code_right .az_ed_download,.az_code_de .az_ed_download").hover(function(){
  51. $(this).find("img").attr("src","/static/images/home/az-white.png");
  52. },function(){
  53. $(this).find("img").attr("src","/static/images/home/SVG-07.png");
  54. });
  55. $(".az_no_link .az_no_download").hover(function(){
  56. $(".az_no_download img").attr("src","/static/images/home/az-white.png");
  57. },function(){
  58. $(".az_no_download img").attr("src","/static/images/home/SVG-19.png");
  59. });
  60. $(".az_no_download").click(function(){
  61. $(".warp_no_download_popup").show();
  62. })