동일한 효과이지만 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>