calling a php file in another php file jquery elevatezoom doesnt work -
i beginner please bear me.
i using jquery.elevatezoom.js
zoom on images.
it working fine, problem when name file showimage.php
in dashboard.php
using php's include function, jquery function defined in showimage.php
not executing, not getting zoom.
i have dashboard. when click on button, bound javascript function loads page in dashboard, , page getting loaded php file includes showimage.php
.
jquery.min
called @ dashboard's load event.the dashboard has button when clicked loads php file first loads
showimage.php
using php's include function.
here code showimage.php
:
<!doctype html> <html> <head> <meta charset='utf-8'/> <title>jquery elevatezoom demo</title> <script src='jquery.elevatezoom.js'></script> </head> <body> <h1>basic zoom example</h1> <img id="zoom_01" src='images/large/image1.jpg' width="250px" height="250px" data-zoom-image="images/large/image1.jpg"/> <br /> <script> $('#zoom_01').elevatezoom({easing : true}); </script> </body> </html> details.php <?php include 'showimage.php'; ?>
can me determine why zoom isn't working?
maybe script executing before html finish add element , try call after few seconds, in showimage.php file.
<script type="text/javascript"> settimeout(function(){ $('#zoom_01').elevatezoom({easing : true}); }, 3000); </script>
Comments
Post a Comment