Subversion Repositories SmartDukaan

Rev

Rev 5145 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5145 Rev 5941
Line 27... Line 27...
27
    $('.product-name').width(newWidth);
27
    $('.product-name').width(newWidth);
28
    $('.comparision-product-column').width(newWidth);
28
    $('.comparision-product-column').width(newWidth);
29
  }
29
  }
30
 
30
 
31
  $('.ui-state-default').click(function(){
31
  $('.ui-state-default').click(function(){
-
 
32
	  if(api){
-
 
33
		  api.destroy();
-
 
34
	  }
32
    var aID = $("li.ui-state-active").children('a:first').attr('href');
35
    var aID = $("li.ui-state-active").children('a:first').attr('href');
33
    var array = aID.split("#");
36
    var array = aID.split("#");
34
    var displayID = array[1];
37
    var displayID = array[1];
35
    var new_aID = $(this).children('a:first').attr('href');
38
    var new_aID = $(this).children('a:first').attr('href');
36
    var new_array = new_aID.split("#");
39
    var new_array = new_aID.split("#");
Line 66... Line 69...
66
      }
69
      }
67
      $(this).removeClass("comparision-hide").addClass('comparision-block');
70
      $(this).removeClass("comparision-hide").addClass('comparision-block');
68
      check = 0;
71
      check = 0;
69
      this.style.display = 'block';
72
      this.style.display = 'block';
70
    });
73
    });
-
 
74
    
-
 
75
    var maxHeight = 0;
-
 
76
    $('.comparision-block .inner-column .featureslisting').each(function(){
-
 
77
        maxHeight = $(this).height() > maxHeight ? $(this).height() : maxHeight;
-
 
78
    });
-
 
79
    maxHeight = Math.max(maxHeight + 10, $(".comparision-product-column").height());
-
 
80
    rightHeight = maxHeight + 177;
-
 
81
    var leftHeight =  $("#sideNav").height() + 25;
-
 
82
 
-
 
83
    adjustHeights(Math.max(leftHeight, rightHeight));
-
 
84
    if(pane){
-
 
85
    	pane = $(selector).jScrollPane({showArrows:true});
-
 
86
    	api = pane.data('jsp');
-
 
87
    }
71
    return false;
88
    return false;
72
  });
89
  });
73
 
90
 
74
  var count_item_rows =  $('.summarypage-row').length;
91
  var count_item_rows =  $('.summarypage-row').length;
75
  var total_column = $('.column-score-total').length;
92
  var total_column = $('.column-score-total').length;
Line 142... Line 159...
142
  });
159
  });
143
  $('.scroller-columns').hide();
160
  $('.scroller-columns').hide();
144
  $('.comparision-page-title').hide();
161
  $('.comparision-page-title').hide();
145
 
162
 
146
}
163
}
-
 
164
 
-
 
165
function adjustHeights(h) {
-
 
166
    $('#slideGuideNav').height(h);
-
 
167
    var feat =  $('.comparision-block .inner-column .featureslisting');
-
 
168
    if(!feat.attr("adjusted")) {
-
 
169
        feat.attr("adjusted", "adjusted").height(h - 177);
-
 
170
        
-
 
171
    }
-
 
172
    $('#comparision-right .mk_seperator').height(h - 177);
-
 
173
    $('#comparision-right').height(h);
-
 
174
 
-
 
175
}
147
176