florianw7
Forum Replies Created
-
Forum: Plugins
In reply to: [Elementor Addon Elements] Modal Popup not displaying some ACF Field Types@sa1fo
I didn’t go for the modal popup approach, so I sadly can’t help you any further.Forum: Plugins
In reply to: [Elementor Addon Elements] Modal Popup not displaying some ACF Field TypesNo sadly not, there needs to be an update from the plugin authors. I went for another solution not using Elementor Addon Elements instead.
Forum: Plugins
In reply to: [Elementor Addon Elements] Filterable Gallery Widget not working properlyHi @hardiksharma, thanks for testing!
I did some more tests myself and got it working now. There was a problem with some custom code on my site, so the issue was not related to your plugin. This topic can be closed now.Forum: Plugins
In reply to: [3D Viewer - 3D Model Viewer Plugin] Blue focus outline in safari@melo1551 awesome will try that, thank you!
@melo1551 there you go, adapt it to your needs
barba.hooks.beforeEnter(({ current, next }) => { if (current.container) { let nextHtml = next.html; let response = nextHtml.replace( /(<\/?)body( .+?)?>/gi, "$1notbody$2>", nextHtml ); let bodyClasses = jQuery(response).filter("notbody").attr("class"); jQuery("body").attr("class", bodyClasses); if (bodyClasses.includes( "elementor-page" ) ) { let currentPageId = current.container.querySelector(".elementor").getAttribute("data-elementor-id"); let nextPageId = next.container.querySelector(".elementor").getAttribute("data-elementor-id"); let oldScriptURL = "https://example.com/wp-content/uploads/elementor/css/post-" + currentPageId + ".css"; let newScriptURL = "https://example.com/wp-content/uploads/elementor/css/post-" + nextPageId + ".css"; const oldElementorScript = document.querySelector( 'link[src="' + oldScriptURL + '"]' ); if (oldElementorScript) { oldElementorScript.remove(); } loadjscssfile(newScriptURL, "css"); jQuery('.elementor-element').each(function() { elementorFrontend.elementsHandler.runReadyTrigger( jQuery( this ) ); }); } } });
@melo1551 as far as I understand it, the code has to be placed in the barba.hooks.beforeEnter function, because then it gets executed everytime you switch pages using barba. Have you tried that already?
Its still working on my end. Im using the elementor hello theme btw, but I think it doesn‘t make a difference.
- This reply was modified 2 years, 10 months ago by florianw7.
@melo1551 I used the custom code option from elementor and set the code to be executed at the end of the <body>.
Good news guys!
I finally found a working solution to this problem.
So basically I added this snippet of code to my barba.hooks.beforeEnter function:
<script> jQuery(".elementor-element").each(function () { elementorFrontend.elementsHandler.runReadyTrigger(jQuery(this)); }); </script>
which was mentioned here https://github.com/elementor/elementor/issues/5843#issuecomment-765196491
This basically triggers the javascript of each elementor element, making it work again after a barba page transition. Tested it with an elementor form and an animated headline widget so far.
@ooohboi I think this topic can be closed now ??
Just found out that using barba.js with Elementor also breaks the Elementor Form. When coming from a different page and clicking the submit button, it reloads the page instead of sending the form.
Whereas those other widgets not working with barba is something to endure, this problem is a deal breaker from me, as my website depends on a working contact form.
I’ve tried preventing barba to work when clicking that specific form button, as described here: https://barba.js.org/docs/advanced/strategies/ but sadly I didn’t get it to work.
I’m just writing this here for others that may experience similar issues when trying out barba with elementor and would be relly stoked, if someone comes up with a working solution.
Hi again!
Sadly not, I see no difference in the DOM and it seems that all the relevant css and js files are there but the widgets are only working when manually reloading the site in the browser. I get that behaviour with pretty much every widget, that has some kind of animation playing.
Not sure what else I could try to fix it.
Forum: Plugins
In reply to: [Code Snippets] jQery code not executingIssue resolved, it actually was a typo.
Thank you guys anway for your help!
- This reply was modified 4 years, 10 months ago by florianw7.
Forum: Plugins
In reply to: [Code Snippets] jQery code not executingHi Shea
yes it is linked, I see this in my source code:
<script type="text/javascript" src="https://formlos.at/wp-includes/js/jquery/jquery.js"></script>
As I described above, half of my code is working if I disable some code snippets. I also checked it several times with visual studio code for syntax errors.
It may be conflicting with another plugin or something else on my site.
- This reply was modified 4 years, 10 months ago by florianw7.
Forum: Plugins
In reply to: [Code Snippets] jQery code not executingI tried it now in no conflict mode, but it’s not working / same behaviour as before.
@bungeshea would you be so kind and check it out for yourself, if you have the time? I would share the login details with you.
Forum: Plugins
In reply to: [Code Snippets] jQery code not executingHi @bungeshea,
Can you pls clarify “What method are you using to load jQuery on the-front?” a bit more for me?
I’ve been using $, will try it with “jQuery” when I’m back at my computer!
- This reply was modified 4 years, 10 months ago by florianw7.