index.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. $(function(){
  2. // 轮播图片
  3. var mySwiper = new Swiper('.swiper-container', {
  4. slidesPerView:2.9,
  5. slidesPerGroup:1,
  6. spaceBetween:30,
  7. slidesOffsetBefore:10,
  8. slidesOffsetAfter:100,
  9. })
  10. // 报名弹窗
  11. $('.warn').on('click',function(){
  12. $('.layer').show();
  13. $('.pop-up').show();
  14. $('.pop-up').animate({top:"50%"});
  15. var oid = $(this).attr('data-id');
  16. $('.pop-up .submit_area input[name="hid"]').val(oid)
  17. })
  18. // 关闭按钮
  19. $('.cls').on('click',function(){
  20. $('.pop-up').animate({top:"-50%"},function(){
  21. $('.pop-up').hide();
  22. $('.layer').hide();
  23. $('.pop-up .submit_area input[name="hid"]').val(0)
  24. });
  25. })
  26. // 推荐理由
  27. $('.speity a').on('click',function(){
  28. var that = $(this);
  29. if(that.hasClass('on')){
  30. that.removeClass('on');
  31. $('.reason').hide();
  32. }else{
  33. $('.speity a').removeClass('on');
  34. $('.reason').hide();
  35. that.addClass('on');
  36. that.siblings('.reason').show();
  37. }
  38. })
  39. /*
  40. * 调用的方法
  41. * */
  42. PublicAction.AjaxSend(
  43. {
  44. CORID:'wint_butt', /*操作ID*/
  45. }
  46. );
  47. })