Skip Navigation

[Resolved] Disable current slide dot link

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 6 replies, has 2 voices.

Last updated by Mateus Getulio 4 months ago.

Assisted by: Mateus Getulio.

Author
Posts
#2708269

I built a slider with a Toolset view in the home page (www.raypa.com), with dots pagination. If the user clicks on the dot for the current slide, there is a transition from the current slide back to the same slide. It is a weird behaviour, how can I get rid of it and disable the action for the current dot?

Thank you in advance

#2708361

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

Can you please try to add the following script to the view to try to prevent the current dot from being clicked?

document.addEventListener('DOMContentLoaded', function () {
    const dots = document.querySelectorAll('.wpv-filter-pagination-link');

    dots.forEach(dot => {
        dot.addEventListener('click', function (e) {
            if (dot.parentElement.classList.contains('wpv_page_current')) {
                e.preventDefault(); 
                e.stopPropagation(); 
            }
        });
    });
});

Thank you, please tell me how it goes.
Mateus

#2708394

Hi Mateus,
thank you for your reply.

Unfortunately, the script does not seem to work. I have added it to the page and cleaned the cache, but the dot of the current slide is still clickable...

#2708493

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

I checked this out but so far I couldn't find a fix for it.

I asked my colleagues to have a look at this issue in order to see if there's anything I'm missing.

I'll come back here as soon as one of my colleagues reply back to me (which it shouldn't take long).

Thanks,

#2708665

Thank you for the update Mateus

#2708848

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi,

I have escalated this ticket to our 2nd tier of support where our 2nd tier specialists will take a deeper look at this issue and will try to find a solution.

I will get back to you as soon as I get an answer from them.

Best regards,
Mateus

#2709260

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello Maria,

Thank you for your patience as we investigated this issue further.

After a thorough examination by our 2nd tier support, we have determined that it is not feasible to disable the functionality of the active dot without altering the core plugin code. Unfortunately, any attempt to disable the click event on the active dot triggers errors within the Views JavaScript code. The click event handler is applied at the body level, not directly on the element, which makes it impossible to selectively remove the event handler for the active dot without affecting the functionality of other dots.

Given these constraints, our suggestion is to change the slider animation to fade in rather than slide in. This adjustment will make the effect of clicking the active dot less noticeable and might offer a more seamless user experience.

We have already submitted an internal ticket to our developers to include an option to natively disable the current dot or the transition from one slide to itself.

I'm afraid I can't give you an exact ETA, as soon as we have news regarding this feature I'll reach out to you here in the ticket.

We apologize for the inconvenience and thank you for your patience while this feature gets developed.