Advertisement
vanchelo

Untitled

Sep 18th, 2012
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     $('.only_differences').on('click',function() {
  2.         if ($('.params-values').length > 1) {
  3.             for (var i = $('.params-names li').length; i >= 0; i--) {
  4.                 var a = [];
  5.                 $.each($('.params-values .param_'+i), function(b,v) {
  6.                     a.push($(v).text());
  7.                 })
  8.            
  9.                 var y = true;
  10.                 for (var n = a.length - 1; n >= 0; n-- ) {
  11.                     if (a[n] != a[0]) {
  12.                         y = false;
  13.                         break;
  14.                     }
  15.                 }
  16.                
  17.                 if(y == true) $('.param_'+i).addClass('differences');
  18.             };
  19.         }
  20.         return false;
  21.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement