Tagged: 

Viewing 26 posts - 1 through 26 (of 26 total)
  • Author
    Posts
  • #1183897

    Hi,
    I recently created a custome function for Accordion functionality, So wanted all tabs to be opened when loading the page and it worked until the last update 4.7.3.
    Now, after reloading page, toggler tab opened and closed sequentially…
    I’m not sure what could have affected this activity and the function that I use for that is in Child function theme:

    function add_custom_script(){
    ?>
    <script>
    jQuery(window).load(function(){
         jQuery("p.toggler").trigger('click');
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    Thanks for advice

    #1184283

    Hey Darebvk,

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,
    Victoria

    #1184320

    Hey Victoria,
    I have an Accordion content page, I created a class “.kvr” and add costume script code in Child function.php file like below :

    function add_custom_script(){
    ?>
    <script>
    jQuery(window).load(function(){
         jQuery(".kvr .toggler").trigger('click');
    	  $(this).toggleClass("active");
    
        if (numPanelOpen == 0) {
          openAllPanels(accordionId);
        } else {
          closeAllPanels(accordionId);
        }
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    I wanted tabs that always been open regardless of reload pages
    If you noticed, I recently closed thread on January 28, 2020 at 8:59 am, regarding that on post #1178907
    Everything worked fine until last update, Now, I have tabs are sequentially opened and closed when reloading a page.
    I don’t know why the above script doesn’t work anymore, also I know that some users have been asking for revert a old ALB modal popup options toggles (revert to old ALB design in backend) on the latest update. So I thought it might have something to do with it.
    Anyway I would like to check that someone from your side.
    URL of page with Accordion content attached below:

    Thanks for advice

    January 23, 2020 at 11:18 am

    #1184568

    Hi Darebvk,

    Could you please clear the cache, check again and get back to us.

    Best regards,
    Victoria

    #1184599

    Hey Victoria,
    It seem you not understand me well.
    Tabs open corretly on that url, But, if I reload page tab closes automatically >
    https://mydomain.com/#toggle-id-1 , on reload https://mydomain.com/#toggle-id-1-closed

    I don’t want the tab to close on page reload , do you understand. I want the tab always be open whether the page is reloaded or not.

    Thanks for your engagement

    #1184791

    Hi Darebvk,

    https://share.getcloudapp.com/Z4u5v7oR There is an error in your script. Please change it:

    
    function add_custom_script(){
    ?>
    <script>
    jQuery(window).load(function(){
         jQuery(".kvr .toggler").trigger('click');
    	  jQuery(this).toggleClass("active");
    
        if (numPanelOpen == 0) {
          openAllPanels(accordionId);
        } else {
          closeAllPanels(accordionId);
        }
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');
    

    Best regards,
    Victoria

    #1184807

    Hey Victoria,
    I change code as you suggest and still same, did you check it on your side?
    Tab still close on reload https://mydomain.com/#toggle-id-1-closed

    Best Regards

    #1184844

    Hi Darebvk,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #1184871
    This reply has been marked as private.
    #1184983

    After new update ENFOLD 4.7.3 tabs don’t work properly: they don’t open. I had to reinstall 4.7.2.

    #1185035

    Hi Antonio,
    I’m waiting for a response from Victoria, I facing here with different problem, my Tabs open correctly in new update ENFOLD 4.7.3, But I have issue with jQuery functionality.
    If your tabs don’t open, try to play with Enfold option under “Performance” such as > “Disable jQuery Migrate” or “Load jQuery in your footer” , sometimes this option can affect on some element like a Tabs.

    Regards

    #1185327

    Hi Darebvk,

    https://share.getcloudapp.com/d5u0xxdX This code does not do anything, there are no such variables or functions in your code.

    Can you disable caching and minification for now?

    Best regards,
    Victoria

    #1185465

    Hey Victoria,
    Ok. this is not going well with this support, It seem I’ll have to ask another developer for this.
    Among other things, there is another problem after the new update, The content not appers in Flip Box anymore in Icon Grid .
    Should I open a new threat regarding that issue?

    #1185675

    Hi Darebvk,

    No, you don’t need to start a new thread. Where can we find the page with the issue?

    Could you please attach some screenshots of the issue?

    Best regards,
    Victoria

    #1186659

    I found that problem issued if in Theme options Load jQuery in your footer mark as disabled content in flip boxes not showing, But if option Load jQuery in your footer enabled flip boxes working fine.
    So,the conclusion is that flip boxed content is only displayed if option Load jQuery in your footer ENABLED.

    • This reply was modified 4 years, 10 months ago by Darebvk.
    #1187034

    Hi,

    Thanks for the update. So it’s working as it should if you load jQuery in the footer?

    Best regards,
    Rikard

    #1187137

    Hi Rikard,

    Yes and No :-(
    Well, if I’m logged into wp-dashboard on preview is ok, But if I logged out it does not open as expected…
    I can’t figure out out what causes this, seems like has something to do with the cache,

    Regards

    #1189329

    Hi,

    Sorry for the delay. We tried to access the dashboard of the staging site but got temporarily locked out because of Wordfence. Please disable the plugin temporarily so that we can check the issue. A screenshot of the section or page containing the toggler will definitely help.

    Best regards,
    Ismael

    #1192626

    Hey Ismael,
    thanks for your engagement, problem with Flip Box solved, But I wonder can look at the custome function from the beginning of this thread I’m trying to set for the toggler trigger.
    I following your guidelines for this case But but unsuccessfully.
    I don’t know how to make the toggler always open, whether the page is reloaded or not since a option “Multiple toggles open allowed” in Accordion settings…
    I’m not a JS expert, but I believe that the solution for this lies somewhere between these attempts below:
    first:

    function add_custom_script(){
    ?>
    <script>
    jQuery(window).load(function(){
         jQuery(".kvr .toggler").trigger('click');
    	  jQuery(this).toggleClass("active");
    
        if (numPanelOpen == 0) {
          openAllPanels(accordionId);
        } else {
          closeAllPanels(accordionId);
        }
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    Second:

    function add_custom_script(){
    ?>
    <script>
    jQuery(window).load(function(){
    	   jQuery(".kvr.toggler").addClass("activeTitle");
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    Thanks for advice
    Darko

    #1193391

    Hi,

    Again, sorry for not replying immediately. We are still locked out of the admin area because of WordFence. Please disable the plugin temporarily so that we can access the dashboard and edit the script. Also, a link to the actual page containing the togglers will help.

    // https://imgur.com/a/0d0bHHv

    Best regards,
    Ismael

    #1193653

    Hey Ismael,
    sorry for the restriction, i can’t keep the content unprotected while waiting for a reply, Please check detail below

    Thanks for advice

    #1193987

    Hi,

    Thank you for the info.

    We modified the code in the functions.php file a bit.

    /* Function for toggler */
    function add_custom_script(){
    ?>
    <script>
    (function($) {
    	$(document).ready(function(){
        	$(".kvr .toggler").addClass("activeTitle");
    		$(".kvr .toggle_wrap").addClass("active_tc");
    		$(".kvr .toggle_wrap").css("display", "block");
    	});
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    The togglers are now automatically opening on page load.

    Best regards,
    Ismael

    #1194054

    Hey Ismael,
    Great tip, your modified the code works like charm. That’s exactly what I was looking for, thank you very much for your support.

    Best Regards!
    Darko

    #1194850

    Hi Darebvk,

    Glad we could help :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1194894

    Hey Victoria,
    Thanks, Yes you can, I already posted a topic under another account, I split the accounts for each Enfold license by client.
    You can feel free to close this topic.

    Best Regards
    Darko

    #1194930

    Hi Darko,

    Great! :)

    We are closing the thread.

    Best regards,
    Victoria

Viewing 26 posts - 1 through 26 (of 26 total)
  • The topic ‘Issue with toggler trigger after new update’ is closed to new replies.