index.js 1.0 KB

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