请选择 进入手机版 | 继续访问电脑版
搜索附件  
自丢网 附件中心 建站程序/IT教程 JavaScript教程 12-精品展示案例.zip

热门下载

左侧广告
版权所有:自丢网
For 2020-2050 © zidiu.com

12-精品展示案例.zip

 

js淘宝精品服饰案例tab切换代码教程:
淘宝精品服饰案例tab切换代码教程
javascript代码:
  1. <script>
  2.         $(function() {
  3.             // 1. 鼠标经过左侧的小li
  4.             $("#left li").mouseover(function() {
  5.                 // 2. 得到当前小li 的索引号
  6.                 var index = $(this).index();
  7.                 console.log(index);
  8.                 // 3. 让我们右侧的盒子相应索引号的图片显示出来就好了
  9.                 // $("#content div").eq(index).show();
  10.                 // 4. 让其余的图片(就是其他的兄弟)隐藏起来
  11.                 // $("#content div").eq(index).siblings().hide();
  12.                 // 链式编程
  13.                 $("#content div").eq(index).show().siblings().hide();

  14.             })
  15.         })
  16.     </script>
复制代码