PhotoSwipe icon indicating copy to clipboard operation
PhotoSwipe copied to clipboard

slideshow doesnt show using jquery mobile

Open kiga01 opened this issue 13 years ago • 4 comments

hi im been following the examples of photoswipe for my own website, but i cant fix something with photoswipe, the gallery its working fine, but when i select one picture of the gallery nothing happens, the slideshow doesnt show, it just redirect to the picture. im using the javascript from the example

(function(window, $, PhotoSwipe){

            $(document).ready(function(){

                $('div.gallery-page')
                    .live('pageshow', function(e){

                        var 
                            currentPage = $(e.target),
                            options = {},
                            photoSwipeInstance = $("ul.gallery a", e.target).photoSwipe(options,  currentPage.attr('id'));

                        return true;

                    })

                    .live('pagehide', function(e){

                        var 
                            currentPage = $(e.target),
                            photoSwipeInstance = PhotoSwipe.getInstance(currentPage.attr('id'));

                        if (typeof photoSwipeInstance != "undefined" && photoSwipeInstance != null) {
                            PhotoSwipe.detatch(photoSwipeInstance);
                        }

                        return true;

                    });

            });

        }(window, window.jQuery, window.Code.PhotoSwipe));

when im trying to debug this is my error

http://img5.imageshack.us/img5/8571/6bzp.png

the javascript of the example work fine when i run it from my deskop, but when i upload the code on my own website nothing happens, i dont know what to do!

Thanks for any help u can bring me!!

kiga01 avatar Jun 22 '13 17:06 kiga01

Change .live() to .on() (due to the query updat)

oblaum avatar Jun 24 '13 14:06 oblaum

thank u!! now something happens, the slideshow doesnt load the icons or the buttons, where i should have the picture folders. how i fix this?

thanks!!

kiga01 avatar Jun 24 '13 15:06 kiga01

icon file is called 'icons.png' in the folder 'images'. folder should be placed where your html file is located.

oblaum avatar Jun 24 '13 15:06 oblaum

that was my problem!, thank u!!! i have one question, i dont know if its photoswipe fault, but when i load for first time the gallery page, and i try to see one gallery nothing happens, its like the link its broke, but if i reload the same page, it works perfectly. its photoswipe´s fault? if it is how i fix that?. and now with the buttons working the "left" and "right" doesnt work, "play" and "exit" works perfectly!, how i fix the actions of the first 2 buttons?. oblaum, thanks for all the help!!

kiga01 avatar Jun 24 '13 16:06 kiga01