1

I want to create a mobile site that Stay Standalone and don't open link on safari so I use the following script, but this script blocks photoswipe photo gallery. This is the script that prevents photoswipe from working.

<script>
var a=document.getElementsByTagName("a");
for(var i=0;i<a.length;i++)
{
    a[i].onclick=function()
    {
        window.location=this.getAttribute("href");
        return false
    }
}
</script>

and this is the script for photoswipe

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>    
<script type="text/javascript" src="script/klass.min.js"></script>
<script type="text/javascript" src="script/code.photoswipe-3.0.5.min.js"></script>

    <script type="text/javascript">

            (function(window, $, PhotoSwipe){
                $(document).ready(function(){
                    var options = {};
                    $(".detalleimg a").photoSwipe(options);
                });
            }(window, window.jQuery, window.Code.PhotoSwipe));

    </script>
patas1818
  • 93
  • 1
  • 8

0 Answers0