SHARE
TWEET

Untitled

a guest Jun 18th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $('.items:visible').fadeOut...
  2.      
  3. <a class="ativ" href="javascript:;" data-service="item-1">Serviço 1</a>
  4.      ↑
  5.      
  6. $(document).on('click', '.menu-services li a.ativ', function(){
  7.      
  8. $(document).on('click', '.menu-services li a.ativ', function(){
  9.    $('.menu-services li a').removeClass("ativ"); // remove a classe
  10.    var item_id = $(this).attr("data-service");
  11.    $('.items:visible').fadeOut(400, function(){
  12.       $('.'+item_id).delay(700).fadeIn(400, function(){
  13.          $('.menu-services li a').addClass("ativ"); // restaura a classe
  14.       });
  15.    });
  16. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top