This is a migrated thread and some comments may be shown as answers.

Kendo UI Mobile & Photoswipe

3 Answers 101 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kyriakos
Top achievements
Rank 1
Kyriakos asked on 22 Apr 2013, 01:57 PM
Hi ,
 I'm trying to build a image gallery with options on swipe the image to the next image and prev image location of an array of images.

The best next thing i could find was the following http://www.webresourcesdepot.com/image-gallery-for-mobile-and-touch-devices-photoswipe/
which does the job perfectly on any browser and with custom toolbar where you can add options for close and etc.
The problem is when i compile the kendo application for ipad 2.0 using phonegab and the latest xcode version the gallery opens fine but i have no event custom listeners except the ones the gallery supports.
I mean if on the toolbar i attach a div with a ID and i try call that id onclick or on tap the event doesnt triggers.
The gallery appends classes on the body and adds some html as well.

So i cant find a relative solution to this problem , is there any other gallery someone could suggest to use that runs on kendo ui mobile?





3 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 24 Apr 2013, 10:50 AM
Hi Kyriakos,

Using the DOM click event is not recommended as it is not optimized for touch devices. Instead I suggest using the build-in click/select events of the widgets, the Kendo Mobile touch events (docs/demo) or hooking up to the touchend event.
To solve the particular problem which you described, please make the following change in the code:
$("#runmeagain").on('touchend click', function (e) {
    $('body').removeClass('ps-active');
    gridview(domain, cat_id);
    PhotoSwipe.unsetActivateInstance(instance);
    PhotoSwipe.detatch(instance);
    // PhotoSwipe.disposeInstance(instance);
});


Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
AppsWiz
Top achievements
Rank 1
answered on 30 May 2013, 01:15 AM
Hi Alexander,

Can you please expand on your answer? i.e. where is the code you have supplied meant to go as I can't find anywhere suitable.

Thanks.
0
Alexander Valchev
Telerik team
answered on 31 May 2013, 08:37 AM
Hi AppsWiz,

The code sample from my previous post was related to the project provided by the topic author. The recommendations apply to all Kendo Mobile applications.

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Kyriakos
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
AppsWiz
Top achievements
Rank 1
Share this question
or