Fullscreen Slider MoveTo function no longer works?
-
Dear @DMB
did you use it in the Custom HTML section?Have a look here:
http://laytheme.com/documentation.html#custom-javascriptBest!
Marius
-
@mariusjopen Hi, actually it works, but not horizontally strangely, only vertically. Strange
-
-
Hi there!
Having the same problem, switching 'horizontal' to 'vertical' seems to work with my current code. Horizontal does not work.
Custom HTML at body:
<script> window.laytheme.on("newpageshown", function(layoutObj, type, obj){ if(type == "project"){ jQuery(function() { var isDragging = false; jQuery("p") .mousedown(function() { isDragging = false; }) .mousemove(function() { isDragging = true; }) .mouseup(function() { var wasDragging = isDragging; isDragging = false; if (wasDragging) { console.log("MOVE yo"); jQuery.fn.fullpage.moveTo(1); } }); }); } }); </script>
Any idea what could be causing this? Cheers!
Best,
Kubmin -
-
Hi Marius,
Thanks for your response!
This was just an example (I was trying to see if the user was selecting text, if so, cancel the slide tirgger), the issue is that the FullPage functionjQuery.fn.fullpage.moveTo();
does not work anymore when the magnetic slides are set to horizontal. Vertically it seems to be working fine.Two examples I tried:
<div class="test"></div> jQuery(".test").on("click", function(){ jQuery.fn.fullpage.moveTo(1); console.log("clicked"); });
or:
jQuery(document).on("click", ".test", function(event) { jQuery.fn.fullpage.moveTo(1); console.log("clicked"); });
Both of the codes above only works fine when setting the slides to vertically. when the slides are set to horizontal, it does not work anymore. Did something change in the new release or am I doing something wrong? It used to work before.
Thanks again!
Kubmin -
Hi @kubmin
Yes. I also tried it and the code you wrote does not work.
I will check with Armin..test { height: 100px; width: 100px; position: fixed; bottom: 0px; left: 0px; background: yellow; z-index: 1000000; cursor: pointer; }
<script> jQuery(document).on("click", ".test", function(event) { jQuery.fn.fullpage.moveTo(1); }); </script>
<div class="test"></div>
All the best!
Marius
-
@mariusjopen any news?
-
-
Hey I cannot reproduce it not working.
You might be on the first Slide and then
jQuery.fn.fullpage.moveTo(1);
does nothing because you are already on the first slide.You might have to do
jQuery.fn.fullpage.moveTo(2);
Maybe try
jQuery.fn.fullpage.moveSectionDown();
Also please post a URL to your website to where you have the problem, so I can take a look there.
Have you also made sure to update all of your plugins and themes?
Also make sure to not include jquery by yourself with<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/core.js"></script>
-
ok i know this is really old, but maybe try
jQuery.fn.fullpage.moveTo(0,1);
the second parameter "1" is the horizontal number, the first number "0" is the vertical number.
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it