Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. $('.items:visible').fadeOut...
  2.  
  3. <a class="ativ" href="javascript:;" data-service="item-1">Serviço 1</a>
  4.  
  5. $(document).on('click', '.menu-services li a.ativ', function(){
  6.  
  7. $(document).on('click', '.menu-services li a.ativ', function(){
  8. $('.menu-services li a').removeClass("ativ"); // remove a classe
  9. var item_id = $(this).attr("data-service");
  10. $('.items:visible').fadeOut(400, function(){
  11. $('.'+item_id).delay(700).fadeIn(400, function(){
  12. $('.menu-services li a').addClass("ativ"); // restaura a classe
  13. });
  14. });
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement