Jump to content

javascipt uikit bug


Recommended Posts

could someone help me find the javascript bug?


or here:


I want it to be NOT draggable on desktop but draggable on mobile devices. Also, on mobile, the element that I drag into focus should automatically be active, but on desktop, only when I click it.

It works fine on desktop, but when you drag on mobile, after the dragged element is active and you click it, it switches back and forth between this and the previous element (assigns the active class to the previous element).

I already tried to find help elsewhere, since this is not directly PW related but only frontend, but it's hard to find support or a community for uikit. PW seems to be using it quite a lot though…

Thanks for help

Link to comment
Share on other sites

Hello @fruid,

I don't understand why you would like to disable drag in the slider and I haven't looked at your JavaScript.

But if you want to jump to a slide with a link you could always add a link link this:

<a href="#" data-uk-slider-item="1"></a>

So you could link the slider item to itself for example.

Or you could build two sliders, one visible on desktop and one visible on mobile. Thats more markup but no duplicate content for search engines. ?

Regards, Andreas

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...