kthornbloom / Smoothproducts

A simple, lightweight and responsive product image viewer using jQuery
kthornbloom.com/smoothproducts
185 stars 89 forks source link

fix simple bug url.indexOf is not a function #46

Open vahidalvandi opened 4 years ago

vahidalvandi commented 4 years ago
<script type="text/javascript">
    /* wait for images to load */
    $(window).load( function() {
        $('.sp-wrap').smoothproducts();
    });
</script>

no work with jquery 3 bellow code work

<script type="text/javascript">

$(window).on('load', function() {  $('.sp-wrap').smoothproducts(); });

</script>
markyves commented 4 years ago

Try to add below code in your custom js instead.

$(function(){ $('.sp-wrap').smoothproducts(); });