[-] MO : crossselling - Added in condition to test element is present.

This commit is contained in:
Damon Skelhorn
2012-12-18 14:38:48 +00:00
parent 985062f56f
commit ef9e58a27c
+3
View File
@@ -41,6 +41,8 @@ function cs_serialScrollFixLock(event, targeted, scrolled, items, position)
} }
$(document).ready(function(){ $(document).ready(function(){
if($('#crossselling_list').length > 0)
{
//init the serialScroll for thumbs //init the serialScroll for thumbs
cs_serialScrollNbImages = $('#crossselling_list li').length; cs_serialScrollNbImages = $('#crossselling_list li').length;
cs_serialScrollNbImagesDisplayed = 5; cs_serialScrollNbImagesDisplayed = 5;
@@ -61,4 +63,5 @@ $(document).ready(function(){
cycle:false cycle:false
}); });
$('#crossselling_list').trigger( 'goto', [cs_middle-3] ); $('#crossselling_list').trigger( 'goto', [cs_middle-3] );
}
}); });