jQuery ezPlus 그누보드 상세페이지 이미지에 적용소스
<?php
/*
<img id="zoom_02" src="images/small/image1.jpg" data-zoom-image="images/large/image1.jpg"/>
<script>$("#zoom_02").ezPlus({tint: true, tintColour: '#F90', tintOpacity: 0.5});</script>
*/
// https://www.jqueryscript.net/demo/Image-Zoom-Viewer-Gallery-Plugin-jQuery-ezPlus/
// https://igorlino.github.io/elevatezoom-plus/examples.htm
$content = $it['it_explan'];
$content = conv_content($content, 1);
$content = preg_replace("/ title=\".*?\"/", "", $content);
$content = preg_replace("/ alt=\".*?\"/", "", $content);
preg_match_all("/<img[^>]*src=[\"']?([^>\"']+)[\"']?[^>]*>/i", $content, $matches);
if($matches[0])
{
foreach($matches[0] as $key => $row)
{
if(strstr(strtoupper($row), ".PNG"))
{
//{zoomWindowPosition: \"demo-container\", zoomWindowHeight: 200, zoomWindowWidth: 200, borderSize: 0, easing: true}
//{tint: true, tintColour: '#F90', tintOpacity: 0.5}
$change_row = str_replace("<img", "<script>$(\"#zoom_".$key."\").ezPlus({zoomType: 'lens',lensShape: 'round',lensSize: 500});</script><img id='zoom_".$key."' data-zoom-image='".$matches[1][$key]."' " , $row);
$content = str_replace($row, $change_row, $content);
}
}
}
?>