Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1041553

    Malte K
    Participant

    Hello I do have a question. I do have this code, which is working fine for chrome browser, but in safari the code is not working. it should do: when i click on something, it should click on another thing and click there to open for example the x theme search. what do i do wrong?

    
    
    jQuery(document).ready(function($) {
    
    // Kontakt
    $( '.sfm-menu-item-12263, .sfm-menu-item-12284' ).click(function(e) {
      e.preventDefault();	
    	LM.hideSidebar();
      $( '.kontakt' ).trigger("click");
    });
      
      
    // Suche
    $( '.sfm-menu-item-12264, .sfm-menu-item-12285' ).click(function(e) {
      	e.preventDefault();	
    		LM.hideSidebar();
        $( '.x-btn-navbar-search' ).trigger("click");
    });
    
    });
    #1041785

    Thai
    Moderator

    Hi There,

    Please try with this code instead:

    jQuery(function($) {
    	$(document).ready(function() {
    		// Kontakt
    		$( '.sfm-menu-item-12263, .sfm-menu-item-12284' ).on('click', function(e) {
    			e.preventDefault();	
    			LM.hideSidebar();
    			$( '.kontakt' ).trigger("click");
    		});
    		// Suche
    		$( '.sfm-menu-item-12264, .sfm-menu-item-12285' ).on('click', function(e) {
    			e.preventDefault();	
    			LM.hideSidebar();
    			$( '.x-btn-navbar-search' ).trigger("click");
    		});
    	});
    });

    If it doesn’t work, please provide us with your website URL and admin account so we can take a closer look.

    Thank you.

    #1041920

    Malte K
    Participant

    Its working!! 🙂 THX!!

    #1042596

    Prasant Rai
    Moderator

    You are most welcome. 🙂

    #1042769

    Malte K
    Participant

    The Problem was also that the object to click was hidden. So i needed to make in CSS visibility: visible !important … safari has problems to simulate a click for hidden objects

    #1043145

    Christian
    Moderator

    Glad you’ve sorted it out. 🙂