mbmufffin/FlexSlider — Issue #17: Creating Multiple Instances in Jquery mobile
Author: ecurtis
Created: 2011-11-08 00:43:43+00:00
State: open

I have two slidesshows on interior pages of a mobile app, using jquery mobile. The slide shows do not show when I navigate to the page, however if I reload the page once I get there (or if I go directly there) the slide show works. However If I go to the second slide show page it does not show. I have played with .live .load .ready etc without luck.

I would say it is 95% likely an error on my part, but I thought I would ask.

$(document).ready(function(){
$('#swipeFlexPageOne').load('pageshow',function(event){
alert ('one');
$(this).flexslider({
animation: "slide",
controlsContainer: "#flexImageSliderContainerOne",
directionNav: false,
controlNav: false,
mousewheel: true });
});

$('#swipeFlexPageTwo').load('pageshow',function(event){
alert ('two');
$(this).flexslider({
animation: "slide",
controlsContainer: "#flexImageSliderContainerTwo",
directionNav: false,
controlNav: false,
mousewheel: true });
});
});