supermarket.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /**
  2. * Created by lenovo on 2017/4/27.
  3. */
  4. function xpT(x){
  5. var li=$("#txtUl li");
  6. var xiaoBox=$("#xwBox .xiaoBox");
  7. for (var j=0; j<xiaoBox.length; j++){
  8. xiaoBox[j].style.display="none";
  9. li[j].style.color=" #ffffff";
  10. }
  11. xiaoBox[x].style.display="block";
  12. li[x].style.color="red";
  13. }
  14. function fou(f){
  15. var li=$("#txtUl li");
  16. for (var j=0; j<li.length; j++){
  17. li[j].style.color=" #ffffff";
  18. }
  19. li[f].style.color="red";
  20. }
  21. $(document).ready(function () {
  22. /* ͼƬ����Ч�� */
  23. $(".mr_frbox").slide({
  24. titCell: "",
  25. mainCell: ".mr_frUl ul",
  26. autoPage: true,
  27. effect: "leftLoop",
  28. autoPlay: true,
  29. vis: 4
  30. });
  31. });
  32. $(function(){
  33. var scrtime;
  34. $("#zhanshi").hover(function(){
  35. clearInterval(scrtime);
  36. },function(){
  37. scrtime = setInterval(function(){
  38. var $ul = $("#zhanshi .ul1");
  39. var liHeight = $ul.find("li:last").height();
  40. $ul.animate({marginTop : liHeight + 35 + "px"},1000,function(){
  41. $ul.find("li:last").prependTo($ul)
  42. $ul.find("li:first").hide();
  43. $ul.css({marginTop:0});
  44. $ul.find("li:first").fadeIn(1000);
  45. });
  46. },3000);
  47. }).trigger("mouseleave");
  48. });