on our animation, one of the layer is position at say 100px -- which works great on desktop but on mobile devices i need to reposition it to zero. I can render some additional javascript from server side based on the device however i don't know what function should i call on the animation object.
- i tried jQuery("mylayer").css({left:0}) - and it worked fine as long as the slide was visible, but the next time the slide shows up the layer renders on its original position.
- I also tried to remove the data-x attribute of the layer but it didn't work
my random guess is i need to refresh the slider object however what i dont know is what layerslider object is named when its rendered and if there is any refresh function.
any one has any tips? is there any docs for slider library?
© Copyright 2013-2017 DrupalExp - All Rights Reserved
Hello,
Layerslider module base on Revolution jQuery Plugin. and there are no option to set layer option for each device. But you can create multiple layers with same content, same effect and use bootstrap classes to control what is device it will be appears.
For example: layer A with class 'visible-md' will only appears on desktop. Layer B with class visible-mobile will only appear on mobile.
Hope this help.
Thank you.
Thank you susu. It actually is a great tip and I had thought about it too however the challenge then becomes the slider counts them as three slides!
so if i duplicate my second slide and mark the second slide to be desktop only and third slide to be mobile only based on the boostrap css, the slider still counts them three and it causes a blank screen.
Any solution for that?
Nevermind - I ended up getting it resolved. I ended up using multiple layers within same slide to fix the issue.
Thank you again sir for the support. You Rock!