You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have 6 diffrent div, every div has 4 png. this divs in a slider. when slider init I'm enabling plax on number 1 div. when I slide to another div disable number 1 div and activate second div's plax. its working fine. but in ipad or iphone after few times disable/enable parallax stop working.
here is sample two function when change slide. Am I doing wrong?
Not able to reproduce on iPhone, iOS 7.0.4... I've tried enabling/disabling about 20 times without it stopping to work...
How frequent does this happen on your end? Every second time? Every 50th time?
Two differences in how I use it compared to the sample you give;
I do not use a activityTarget for enable.
Each img element has data-xrange, data-yrange, and data-invert attributes and a specific class for "tagging". Then I simply do $('.PlaxLayer', '#SlideOne').plaxify() to apply to all elements at the same time, instead of calling .plaxify once for each element.
Otherwise I use it pretty much identical to your approach.
I noticed (iphone5-ios7) plax working first load and rotation. I just touched screen and it stops working. tryed again continue to work.. after I clicked emty links on the page (it return false) stop worked again. something intturped code but I'm not sure what it is.
I'm optimizing my codes, I will send you when I finis it.. you can see oter screens.
I have 6 diffrent div, every div has 4 png. this divs in a slider. when slider init I'm enabling plax on number 1 div. when I slide to another div disable number 1 div and activate second div's plax. its working fine. but in ipad or iphone after few times disable/enable parallax stop working.
here is sample two function when change slide. Am I doing wrong?
thank you
function initSlideOne() {
$.plax.enable({ "activityTarget": $ ('#SlideOne') });
$.plax.disable({ "clearLayers": true, "restorePositions": true });
$("#SlideOne img.layer1").plaxify({ "xRange": 0 });
$("#SlideOne img.layer2").plaxify({ "xRange": 100 });
$("#SlideOne img.layer3").plaxify({ "xRange": 130 });
$("#SlideOne img.layer4").plaxify({ "xRange": 100, "invert": true });
$("#SlideOne img.layer5").plaxify({ "xRange": 200, "invert": true });
}
function initSlideTwo() {
$.plax.enable({ "activityTarget": $ ('#SlideTwo') });
$.plax.disable({ "clearLayers": true, "restorePositions": true });
$("#SlideTwo img.layer1").plaxify({ "xRange": 0 });
$("#SlideTwo img.layer2").plaxify({ "xRange": 100 });
$("#SlideTwo img.layer3").plaxify({ "xRange": 130 });
$("#SlideTwoe img.layer4").plaxify({ "xRange": 100, "invert": true });
$("#SlideTwo img.layer5").plaxify({ "xRange": 200, "invert": true });
}
The text was updated successfully, but these errors were encountered: