Tagged: tabs
-
AuthorPosts
-
February 12, 2020 at 2:59 pm #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
February 13, 2020 at 8:29 pm #1184283Hey Darebvk,
Could you please give us a link to your website, we need more context to be able to help you.
Best regards,
VictoriaFebruary 13, 2020 at 10:04 pm #1184320Hey 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
February 14, 2020 at 4:56 pm #1184568Hi Darebvk,
Could you please clear the cache, check again and get back to us.
Best regards,
VictoriaFebruary 14, 2020 at 7:24 pm #1184599Hey 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 reloadhttps://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
February 15, 2020 at 7:16 pm #1184791Hi 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,
VictoriaFebruary 15, 2020 at 8:08 pm #1184807Hey 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-closedBest Regards
February 15, 2020 at 9:20 pm #1184844Hi 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,
VictoriaFebruary 15, 2020 at 10:44 pm #1184871This reply has been marked as private.February 16, 2020 at 5:03 pm #1184983After new update ENFOLD 4.7.3 tabs don’t work properly: they don’t open. I had to reinstall 4.7.2.
February 16, 2020 at 11:50 pm #1185035Hi 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
February 17, 2020 at 6:06 pm #1185327Hi 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,
VictoriaFebruary 17, 2020 at 11:47 pm #1185465Hey 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?February 18, 2020 at 2:49 pm #1185675Hi 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,
VictoriaFebruary 21, 2020 at 11:05 am #1186659I 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, 9 months ago by Darebvk.
February 23, 2020 at 5:34 am #1187034Hi,
Thanks for the update. So it’s working as it should if you load jQuery in the footer?
Best regards,
RikardFebruary 23, 2020 at 9:37 pm #1187137Hi 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
March 2, 2020 at 5:22 am #1189329Hi,
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,
IsmaelMarch 12, 2020 at 2:29 pm #1192626Hey 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
DarkoMarch 16, 2020 at 5:11 am #1193391Hi,
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,
IsmaelMarch 16, 2020 at 9:28 pm #1193653Hey Ismael,
sorry for the restriction, i can’t keep the content unprotected while waiting for a reply, Please check detail belowThanks for advice
March 18, 2020 at 4:52 am #1193987Hi,
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,
IsmaelMarch 18, 2020 at 8:58 am #1194054Hey 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!
DarkoMarch 20, 2020 at 6:11 pm #1194850Hi Darebvk,
Glad we could help :)
If you need further assistance please let us know.
Best regards,
VictoriaMarch 20, 2020 at 7:45 pm #1194894Hey 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
DarkoMarch 20, 2020 at 8:44 pm #1194930Hi Darko,
Great! :)
We are closing the thread.
Best regards,
Victoria -
AuthorPosts
- The topic ‘Issue with toggler trigger after new update’ is closed to new replies.