daily pastebin goal
5%
SHARE
TWEET

Untitled

maximus87 Feb 13th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if ($('.tabs-nav').length) {
  2.         $('.tabs-nav li:first-child').addClass('active');
  3.     }
  4.     if ($('.tabs-content').length) {
  5.         $('.tabs-content li:first-child').addClass('active');
  6.     }
  7.  
  8.     $('.tabs-nav li').on("click", (function(){
  9.         $('.tabs-nav li').removeClass("active");
  10.         $(this).addClass('active');
  11.         var dataid = $(this).data('id');
  12.         console.log(dataid);
  13.         $('.tabs-content li').removeClass("active");
  14.         $('#' + dataid).addClass('active');
  15.     }))
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