Guest User

Untitled

a guest
Jul 23rd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(function(){
  2.     $(document).ready(function(){
  3.         var i = 1;
  4.         $('.discount h2').each(function(){
  5.             if (i == 1) {
  6.                 i++;
  7.                 var firstDiscount = $(this),
  8.                     heightFirst = firstDiscount.height();
  9.             } else {
  10.                 i--;
  11.                 var secondDiscount = $(this),
  12.                     heightSecond = secondDiscount.height();
  13.                 if (heightSecond > heightFirst) {
  14.                     console.log('ok');
  15.                 }
  16.                 console.log(heightFirst);
  17.                 console.log(heightSecond);
  18.                 return false;
  19.             }
  20.         });
  21.     });
  22. });
Add Comment
Please, Sign In to add comment