-
AuthorPosts
-
August 6, 2014 at 9:58 am #300554
Hi guys,
I’m not sure if this is an Enfold specific issue, but maybe you could give me a hint on what to do. I have set up an Enfold site which is highly appreciated by visitors and members. Everything looks and feels great and I have been able to solve a lot of issues on my own on the way, but this issue I simply don’t understand and it’s quite an important one for our website.On one page I’m trying to insert an external javascript to load a booking function. The problem is it only loads/execute when it feels like it. The problem is most persistent on Safari, but I’m also seeing this issue on Firefox. When I first visit the page the javascript may or may not load, and if I do a reload it may or may not load. It’s completely random.
I think this issue may have started when I updated Enfold a month ago, but I didn’t notice it until now when a visitor complained and said that he’s been experiencing this for about a month and now got tired of it and e-mailed.
Please, please – what to do? I’m a complete idiot when it comes to Javascript.
KattaC
August 7, 2014 at 2:06 pm #301111Hey KattaC!
Thank you for visiting Kriesi’s forum.
What is the actual script? How did you add it? Note that we don’t support third party plugin or script as stated on our support policy. On the console there’s already an error for require.js. You should probably ask the script author.
Best regards,
IsmaelAugust 8, 2014 at 11:18 pm #301839This reply has been marked as private.August 9, 2014 at 12:03 am #301858Hey!
Try using this code instead:
(function($){ $(window).load(function() { $.getScript( "http://gitwidgets.golf.se/Widget/script.js" ) .done(function( script, textStatus ) { GITWidget.addBookings({guid: 'c4ed8454-4c3d-44a2-994a-ca1488972435' }); }); }); })(jQuery);
Reference: http://api.jquery.com/jquery.getscript/
Best regards,
JosueAugust 9, 2014 at 9:01 am #301956Sorry, Josue. In Firefox the window keeps loading but nothing happens. In Safari a new window is opened with the booking page (but no Enfold layout).
August 9, 2014 at 9:08 am #301957Hi!
Yes, but the code is now working. For example on Chrome: http://screencast.com/t/e4EJsYLe0xt
Debugging it for the other browsers is on your own :)
Best regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.