gsmashik

Add Class Based On Z-index

Aug 18th, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $('.main-stack').each(function () {
  2.     if ($(this).css('z-index') == '5') { // Change here.
  3.         $('.main-stack .card')
  4.             .addClass('ui-front top-card')
  5.             .removeClass('flipped ui-draggable-disabled ui-droppable-disabled')
  6.             .draggable({
  7.                 disabled: false
  8.             });
  9.     }
  10. });
Add Comment
Please, Sign In to add comment