123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- $(function(){
- var aindex=0;
- var he = $(window).height();
-
- if(he > 700){
- $('.start-box .i3').css('bottom','25%')
- $('.start-box .i4').css('bottom','13%');
- }
-
- $('.newBtn').on('click',function(){
- $('.start-box').animate({left:'-100%'},function(){
- $(this).hide();
- $('.issue-box').show();
-
- var swiper = new Swiper('.swiper-container', {
-
- autoHeight: true,
- pagination : '.swiper-pagination',
- paginationType : 'custom',
- paginationCustomRender: function (swiper, current, total) {
- return '<span>' + current + '</span> <i>/ ' + total + '</i>';
- },
- onSlideChangeStart: function(swiper){
-
- $('.issue-up').removeClass('hi');
- $('.issue-next').removeClass('in');
- $('.issue-next').removeClass('cen');
- $('.issue-next').addClass('lock');
-
-
- if(swiper.activeIndex == 0){
- $('.issue-next').addClass('cen');
- $('.issue-up').addClass('hi');
- }
- var whether = $('.issue-list ul li').eq(swiper.activeIndex).find('dl').hasClass('in');
-
-
- if(whether){
- $('.issue-next').removeClass('lock');
- $('.issue-next').addClass('in');
- }
-
- if(swiper.activeIndex == 9){
- $('.issue-next').html("提交");
- }else{
- $('.issue-next').html("下一题");
- }
- },
- onTransitionEnd: function(swiper){
- var whether = $('.issue-list ul li').eq(swiper.activeIndex).find('dl').hasClass('in');
- if(swiper.activeIndex == 9){
- $('dl.result dd').on('click',function(){
- $('.issue-next').addClass('addClick');
- })
- if(whether){
- $('.issue-next').addClass('addClick');
- }
- }
- },
-
-
-
- });
- $('.issue-up').on('click',function(){
- $('.issue-next').removeClass('addClick');
- swiper.slidePrev();
- })
- $('.issue-next').on('click',function(){
- swiper.slideNext();
- })
-
-
- })
- })
-
- $('dl.result dd').on('click',function(){
- var that = $(this);
- that.addClass('on').siblings().removeClass('on');
- $('.issue-next').addClass('in');
- $('.issue-next').removeClass('lock');
- that.parent().addClass('in');
-
- var cost = that.attr('data-id');
- if(cost != undefined && cost != null && cost != ''){
- that.parent().attr('data-txt',cost);
- }
-
- })
-
- $('.issue-list').on('click','.addClick',function(){
- $('.card').animate({left:'50%'},function(){
- $('.card').show();
- });
- $('.cur').show();
- })
-
- $('.wcls').on('click',function(){
- $('.card').animate({left:'-100%'},function(){
- $('.cur').hide();
- });
- })
-
- $('.method,.cust-btn').on('click',function(){
- location.reload();
- })
-
-
- $('.card .m-img input').on('focus',function(){
- $('.card .m-img').css('border-color','#DDDDDD');
- })
-
- PublicAction.AjaxSend(
- {
- CORID:'method-btn',
- }
- );
- })
|