Advertisement
Chrizz93

Untitled

May 11th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function() {
  2.     var panels = $('.user-infos');
  3.     var panelsButton = $('.dropdown-user');
  4.     panels.hide();
  5.  
  6.     //Click dropdown
  7.     panelsButton.click(function() {
  8.         //get data-for attribute
  9.         var dataFor = $(this).attr('data-for');
  10.         var idFor = $(dataFor);
  11.  
  12.         //current button
  13.         var currentButton = $(this);
  14.         idFor.slideToggle(400, function() {
  15.             //Completed slidetoggle
  16.             if(idFor.is(':visible'))
  17.             {
  18.                 currentButton.html('<i class="glyphicon glyphicon-chevron-down"></i>');
  19.             }
  20.             else
  21.             {
  22.                 currentButton.html('<i class="glyphicon glyphicon-chevron-down"></i>');
  23.             }
  24.         });
  25.     });
  26.  
  27.  
  28.     $('[data-toggle="tooltip"]').tooltip();
  29.  
  30.     $('button').click(function(e) {
  31.         e.preventDefault();
  32.     });
  33. });
  34. /* kommentar*/
  35. $(document).ready(function(){
  36.  
  37.    
  38.     $("[data-toggle=tooltip]").tooltip();
  39. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement