Server : Apache System : Linux iZ2vcgyutqttsd1p850kl8Z 3.10.0-1160.92.1.el7.x86_64 #1 SMP Tue Jun 20 11:48:01 UTC 2023 x86_64 User : www ( 1000) PHP Version : 5.6.40 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv Directory : /www/wwwroot/saimikebio.com/themes/lingshi/js/ |
$(function(){ /*商品详情页tab切换 strat*/ $('.itemContentHead li').click(function(){ type = '#' + $(this).attr('data-position'); $('html,body').animate({scrollTop:$(type).offset().top -15},300); }) /*商品详情页tab切换 end*/ /*商品详情页滚动tab切换 strat*/ $(window).scroll(function(){ docT = $(document).scrollTop(); objD1 = $('#D1').offset().top - 15; objD2 = $('#D2').offset().top - 15; objD3 = $('#D3').offset().top - 15; if(docT > objD1){ $('.itemBar').fadeIn(); }else{ $('.itemBar').fadeOut(); } if(docT > objD1){ $('#iteamBarHead li').removeAttr('class'); $('#H1').attr('class','itemContentHeadFocus'); } if(docT > objD2-1){ $('#iteamBarHead li').removeAttr('class'); $('#H2').attr('class','itemContentHeadFocus'); } if(docT > objD3-1){ $('#iteamBarHead li').removeAttr('class'); $('#H3').attr('class','itemContentHeadFocus'); } }) /*商品详情页滚动tab切换 end*/ $(".item-thumbs").slide({mainCell:".bd ul",autoPage:true,effect:"left",vis:5}); $("#item-thumbs li a").click(function(){ $("#item-thumbs li").removeClass("current"); $(this).parent().addClass("current"); }) $("#membership,.membership_con").mouseenter(function(){ $(".membership_con").show(); }) $("#membership,.membership_con").mouseleave(function(){ $(".membership_con").hide(); }) $(".seemore_items").slide({mainCell:".bd ul",effect:"top",autoPage:true,scroll:3,vis:3}); $("#skunum").on('click', 'span', function(e) { if ($(this).hasClass("add")) { countNum(1); } else { countNum(-1); } return false; }); $(".sku_list a").click(function(){ $(this).parent().find("a").removeClass("selected"); $(this).addClass("selected"); $(this).parent().find("input:radio").prop("checked",false); $(this).find("input:radio").prop("checked",true); //changePrice(); }) $(".sku_list2").click(function(){ $(this).parent().find("label").removeClass("selected"); $(this).addClass("selected"); }) $("#taocan_tabs li").click(function(){ $("#taocan_tabs li").removeClass("itemtaocanContentFocus"); $(this).addClass("itemtaocanContentFocus"); var i = $("#taocan_tabs li").index($(this)); $("#taocan_panels .panel").hide(); $("#taocan_panels .panel").eq(i).show(); }) }) function countNum(i) { var $count_box = $("#skunum"); var $input = $count_box.find('input'); var num = $input.val(); if (!$.isNumeric(num)) { alert("请您输入正确的购买数量!") $input.val('1'); return; } num = parseInt(num) + i; switch (true) { case num == 0: $input.val('1'); alert('您至少得购买1件商品!'); break; default: $input.val(num); break; } changePrice(); }