investmentDetail.js 904 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // import '../../css/bootstrap.less';
  2. import 'bootstrap/dist/js/bootstrap.js';
  3. import '../../css/public.css';
  4. import '../../css/main_banner.css';
  5. import '../../js/public.js';
  6. import '../../js/main_banner.js';
  7. import '../../css/financial/investmentDetail.css';
  8. $(function(){
  9. var k=0;
  10. var liwit=$('.need_imgs ol li').width();
  11. var lilengths=$('.need_imgs ol li').length;
  12. function next(){
  13. k++;
  14. if(k>lilengths-6){
  15. k=0
  16. }
  17. $('.need_imgs ol').animate({'marginLeft':-(liwit)*k},2000)
  18. };
  19. $('.need_next').click(function(){
  20. next()
  21. });
  22. $('.need_prev').click(function(){
  23. k--;
  24. if(k<0){
  25. k=lilengths-6
  26. }
  27. $('.need_imgs ol').animate({'marginLeft':-(liwit)*k},2000)
  28. });
  29. var timer =setInterval(function(){
  30. next();
  31. },2000);
  32. $('.list_imgs').hover(function(){
  33. clearInterval(timer)
  34. },function(){
  35. timer =setInterval( function(){
  36. next();
  37. },2000)
  38. });
  39. })