Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #768073

    ellsworth
    Participant

    As per the following:
    Thread

    I have implemented

    jQuery(document).ready(function($){
    	$('#abstract.section-expandable').slideToggle(0);
        $('#abstract-trigger-button').click(function(){
           $('#abstract.section-expandable').slideToggle( "slow" );
        });
    });

    in my custom javascript and while it works as expected in the regular desktop browsers on desktop. The buttons that I equip with this javascript do not respond to clicks (taps) on mobile. I am curious if there is a known fix to this issue. I recognize that this is custom javascript code, but perhaps there is a more general fix for javascript that otherwise works well, but for on mobile browsers. I have tested on safari and chrome in iOS. I should mention that chrome devtools (on desktop) when I activate the mobile screen view, it does work there. Weird huh. Hoping there is a known fix to issues such as this. Thanks in advance.

    #768077

    ellsworth
    Participant
    This reply has been marked as private.
    #768271

    Paul R
    Moderator

    Hi,

    Please replace your javascript code with this.

    
    jQuery(document).ready(function($){
    	$('#abstract.section-expandable').slideToggle(0);
        $('#abstract-trigger-button').on( "click touchstart", function() {
           $('#abstract.section-expandable').slideToggle( "slow" );
        });
    });

    Hope that helps.

    #768938

    ellsworth
    Participant

    You’re the best.

    Using this theme was one of the best decisions I have ever made. I am learning so much by being able to ask questions and get responses. I’ll never use another theme. Thank you for your time.

    #769603

    Lely
    Moderator

    You’re welcome!

    Always,
    X