这是相同的效果,但有 4 个不同的缩放元素。如何简化此代码?
<script>
$(document).ready(function(){
$('.etalage').etalage({
show_hint: false,
thumb_image_width: 470,
thumb_image_height: 470,
source_image_width: 1000,
source_image_height: 1000,
zoom_element: '#custom_zoom_element',
//source_image_height: 480,
//source_image_width: 480,
zoom_area_width: 470,
zoom_area_height: 470
});
});
这是相同的效果,但有 4 个不同的缩放元素。如何简化此代码?
$(document).ready(function(){
$('.etalage2').etalage({
show_hint: false,
thumb_image_width: 470,
thumb_image_height: 470,
source_image_width: 1000,
source_image_height: 1000,
zoom_element: '#custom_zoom_element2',
//source_image_height: 480,
//source_image_width: 480,
zoom_area_width: 470,
zoom_area_height: 470
});
});
这是相同的效果,但有 4 个不同的缩放元素。如何简化此代码?
$(document).ready(function(){
$('.etalage3').etalage({
show_hint: false,
thumb_image_width: 470,
thumb_image_height: 470,
source_image_width: 1000,
source_image_height: 1000,
zoom_element: '#custom_zoom_element3',
//source_image_height: 480,
//source_image_width: 480,
zoom_area_width: 470,
zoom_area_height: 470
});
});
$(document).ready(function(){
$('.etalage4').etalage({
show_hint: false,
thumb_image_width: 470,
thumb_image_height: 470,
source_image_width: 1000,
source_image_height: 1000,
zoom_element: '#custom_zoom_element4',
//source_image_height: 480,
//source_image_width: 480,
zoom_area_width: 470,
zoom_area_height: 470
});
});
</script>