Some issue with onclick of buttons

HI,

at page http://thek9way.co.nz/methodology/

I have added a function to show hidden on button “Read More” unfortunately it is working fine at Desktop but it won’t for mobile.

I believe there is some sort of touch setting or click action which won’t get trigger.

Please let me know, how to fix this.

Hi There,

Please find this code:

$(document).ready(function () {
    $('.nav-toggle').click(function () {
        var collapse_content_selector = $(this).attr('href');
        var toggle_switch = $(this);
        $(collapse_content_selector).toggle(function () {
            if ($(this).css('display') == 'none') {
                toggle_switch.html('Read More');
            } else {
                toggle_switch.html('Read Less');
            }
        });
    });

});

And change to this:

$(document).ready(function () {
    $('.nav-toggle').on('click touchend', function () {
        var collapse_content_selector = $(this).attr('href');
        var toggle_switch = $(this);
        $(collapse_content_selector).toggle(function () {
            if ($(this).css('display') == 'none') {
                toggle_switch.html('Read More');
            } else {
                toggle_switch.html('Read Less');
            }
        });
    });
});

Thank you I believe this will sort out the issue.

You’re most welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.