Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

jQuery - function()

0 votes
53 views
added Jul 3, 2018 in jQuery by LC Marshal Captain (25,800 points)
edited Jul 12, 2018 by LC Marshal
var slides = $("#premium-stage .ui-item:not(:last)").hide();
if(slides.length >= 1){
     slider = setInterval('showNext()',5000);
}
function showNext(){
    $("#premium-stage .ui-item:last").prev().fadeIn(500);
    $("#premium-stage .ui-item:last").fadeOut(500,function(){
        $(this).remove().prependTo('#premium-stage');
    });
    
}
function showSlide(el){
     clearInterval(slider);
     if('#'+$("#slider-stage .slider:last").attr('id') != el){
          $(el).remove().insertBefore("#slider-stage .slider:last");
          showNext();    
     }
}

1 Response

0 votes
responded Jun 21, 2019 by LC Marshal Captain (25,800 points)
function showBtnDefault () {
  $(shareBtn).removeClass('on-click');
  $('.share-news-content > img.ico').attr('src', defIco);
  $(shareBox).removeClass('in');
  $('html, body').css({ overflow: 'auto',height: 'auto'});
}

var open = false;
$(shareBtn).click(function() {
    open = !open;

    if(open) {
        console.log('11');
    } else {
      showBtnDefault();
    }
});

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...