JAVASCRIPT   67
common js
Guest on 28th June 2022 04:38:19 AM


  1. var _ua = (function(d) {
  2.     var c = {
  3.         0: (d.indexOf('windows') != -1 && d.indexOf('phone') != -1) || d.indexOf('iphone') != -1 || d.indexOf('ipod') != -1 || (d.indexOf('android') != -1 && d.indexOf('mobile') != -1) || (d.indexOf('firefox') != -1 && d.indexOf('mobile') != -1) || d.indexOf('blackberry') != -1,
  4.         iPhone: (d.indexOf('iphone') != -1),
  5.         Android: (d.indexOf('android') != -1 && d.indexOf('mobile') != -1)
  6.     };
  7.     var b = (d.indexOf('windows') != -1 && d.indexOf('touch') != -1) || d.indexOf('ipad') != -1 || (d.indexOf('android') != -1 && d.indexOf('mobile') == -1) || (d.indexOf('firefox') != -1 && d.indexOf('tablet') != -1) || d.indexOf('kindle') != -1 || d.indexOf('silk') != -1 || d.indexOf('playbook') != -1;
  8.     var a = !c[0] && !b;
  9.     return {
  10.         Mobile: c,
  11.         Tablet: b,
  12.         PC: a
  13.     }
  14. })(window.navigator.userAgent.toLowerCase());
  15.  
  16. function addBrowserClass() {
  17.     var c = function(e, d) {
  18.         if (document.documentElement.className) {
  19.             document.documentElement.className += ' '
  20.         }
  21.         document.documentElement.className += e + (d !== '' ? ' ' + e + (d * 1).toString().replace('.', '_') : '')
  22.     };
  23.     var b = window.navigator.userAgent.toLowerCase();
  24.     var a = window.navigator.appVersion.toLowerCase();
  25.     if (get = b.match(/msie (\d+(\.\d+)?)/i)) {
  26.         c('ie', get[1])
  27.     } else {
  28.         if (get = b.match(/Trident.+rv\:(\d+(\.\d+)?)/i)) {
  29.             c('ie', get[1])
  30.         } else {
  31.             if (get = b.match(/chrome\/(\d+(\.\d+)?)/i)) {
  32.                 c('chrome', get[1])
  33.             } else {
  34.                 if (get = b.match(/firefox\/(\d+(\.\d+)?)/i)) {
  35.                     c('firefox', get[1])
  36.                 } else {
  37.                     if (get = b.match(/opera\/(\d+(\.\d+)?)/i)) {
  38.                         c('opera', get[1])
  39.                     } else {
  40.                         if (get = b.match(/safari\/(\d+(\.\d+)?)/i)) {
  41.                             c('safari', get[1])
  42.                         }
  43.                     }
  44.                 }
  45.             }
  46.         }
  47.     }
  48.     if (get = b.match(/iPhone OS (\d+(\.\d+)?)/i)) {
  49.         c('ios', get[1])
  50.     }
  51.     if (get = b.match(/iPhone;/i)) {
  52.         c('iphone', '')
  53.     } else {
  54.         if (get = b.match(/iPod;/i)) {
  55.             c('ipod', '')
  56.         } else {
  57.             if (get = b.match(/iPad;/i)) {
  58.                 c('ipad', '')
  59.             } else {
  60.                 if (get = b.match(/Android (\d+(\.\d+)?)/i)) {
  61.                     c('android', get[1])
  62.                 }
  63.             }
  64.         }
  65.     }
  66. }
  67. addBrowserClass();
  68.  
  69. // list_style float clear
  70. $(function() {
  71.  
  72.     //firefox蛻、螳�
  73. �螳�
  74.     if (ua.isFirefox) {
  75.         $('html').addClass('ua-firefox');
  76.     }
  77.  
  78.     if ($(".list_style").get([0])) {
  79.         $(".list_style li:nth-child(odd)").css({
  80.             "clear"
  81.        });
  82.        $("     $(".list_style li:nth-child(1),.list_style li:nth-child(2)").addClass("top_border");
  83.    //讀懃エ「繝懊ャ繧ッ繧ケ
  84. ��エ「繝懊ャ繧ッ繧ケ
  85.     $('#searchBtn').on('click', function() {
  86.         $('#searchBox').addClass('show');
  87.     });
  88.  
  89.     $('#searchClose').on('click', function() {
  90.         $('#searchBox').remov// buy box
  91. w');
  92.     });
  93.  
  94. });
  95.  
  96. // buy box
  97. $(function() {
  98.     $(".btn_on_demand").on("click", function() {
  99.         var showbox = $(this).parent().parent().next().next();
  100.         if (showbox.is(':visible')) {
  101.             $(".inner_box").fadeOut(200);
  102.         } else {
  103.             $(".inner_box").fadeOut(200);
  104.             showbox.fadeIn(200);
  105.         }
  106.         return false;
  107.     })
  108.     $(document).click(function() {
  109.         $(".inner_box").fadeOut(200);
  110.     });
  111.     $(".inner_box").click(function() {
  112.         event.s// to top
  113. tion();
  114.     });
  115. })
  116.  
  117. // to top
  118. $(function() {
  119.     $(".btn_top img").on("click", function() {
  120.         $("html,body").animate({
  121.             scrollTop: //header x-scroll
  122.  
  123.     })
  124. })
  125.  
  126. //header x-scroll
  127. $(window).on("load scroll", function() {
  128.     $(".header_wrap").css("left", -// rollover.js
  129. lLeft());
  130. });
  131.  
  132. // rollover.js
  133. function initRollOverImages() {
  134.     var image_cache = new Object();
  135.     $("img.Hover").each(function(i) {
  136.         var imgsrc = this.src;
  137.         var dot = this.src.lastIndexOf('.');
  138.         var imgsrc_on = this.src.substr(0, dot) + '_over' + this.src.substr(dot, 4);
  139.         image_cache[this.src] = new Image();
  140.         image_cache[this.src].src = imgsrc_on;
  141.         $(this).hover(
  142.             function() {
  143.                 this.src = imgsrc_on;
  144.             },
  145.             function() {
  146.                 this.src = imgsrc;
  147.             });
  148.     });
  149. }
  150. $(function() {
  151. //open profile
  152. rImages
  153. });
  154.  
  155.  
  156.  
  157. //open profile
  158. $(function() {
  159.     var profile = $(".my_profile"click" $(".open_profile").on("click", function() {
  160.         if (profile.is(":visible")) {
  161.             profile.fadeOut(200, function() {
  162.                 $(".open_profile").fadeTo(300, "1");
  163.                 $("over"_profile img").addClass("over");
  164.             });
  165.         } else {
  166.             profile.fadeIn();
  167.             $(this).css({
  168.                 "opacity": ".7"
  169.             });
  170.             $(");
  171.        }
  172.        return false;
  173.    })
  174.    $(document).click(function() {
  175.        profile.fadeOut(200, function() {
  176.            $(", function() {
  177.             $(".open_profile").css({
  178.                 "opacity": "1"
  179.             });
  180.             $("over"_profile img").addClass("over");
  181.         });
  182.     });
  183.     profile.click(function() {
  184.         event.stopPropagation();
  185.     });
  186. })
  187.  
  188. if ($(".slider_box .slide").length) {
  189.     $(".slider_box .slide").each(function() {
  190.         $(this).parents(".box").css({
  191.             "height"://open special index
  192.     })
  193. }
  194. //open special index
  195. $(function() {
  196.     var op_sp = $(".special_contents"mouseover".open_special").on("mouseover", function() {
  197.         if (op_sp.is(":visible")) {
  198.             op_sp.fadeOut(200, function() {
  199.                 $(".open_special").fadeTo(300, "1");
  200.             });
  201.         } else {
  202.             op_sp.fadeIn();
  203.             $(this).css({
  204.                 "opacity": ".7"
  205.             });
  206.         }
  207.     })
  208.     op_sp.on("mouseleave", function() {
  209.         op_sp.fadeOut(200, function() {
  210.             $(".open_special").css({
  211.                 "opacity": "1"
  212.             });
  213.         });
  214.     })
  215.     $(".open_special").on("click", function() {
  216.         return false;
  217.     })
  218.     $(document).on("click", function() {
  219.         op_sp.fadeOut(200, function() {
  220.             $(".open_special").css({
  221.                 "opacity": "1"
  222.             });
  223.         });
  224.     });
  225.     op_sp.on("click", function(event) {
  226.         event.st//scroller.js
  227. );
  228.     });
  229. })
  230.  
  231.  
  232. //scroller.js
  233. $(function(jQuery) {
  234.     jQuery.fn.scRoller = function() {
  235.         return this.each(function() {
  236.             $(this).click(function() {
  237.                 $('html,body').animate({
  238.                     scrollTop: $($(this).attr("href")).offset().top - 90
  239.                 });
  240.                 return false;
  241.             });
  242.         });
  243.     };
  244. });
  245. $(function() {
  246.     $('.information').hover(function() {
  247.         $(this).find('.menu__information').fadeIn();
  248.         $(this).find('.menu__information').css('visibility', 'visible');
  249.     }, function() {
  250.         $(this).find('.menu__inform

Raw Paste

Login or Register to edit or fork this paste. It's free.