Ultimate Member Echos Inline JS Breaking Site
-
Hi There,
I have been using Ultimate Member for some time now, I for optimizing my site, wanted to make jQuery on my site, non-render blocking, by ASync method.
Doing this was simple, but as it turns out it breaks my site, Ultimate Member adds the below code, to the html of the page, rather than putting it into a file and enqueue it.
below is the code added by UM
<script type="text/javascript"> jQuery( window ).on( 'load', function() { jQuery('input[name="um_request"]').val(''); }); </script>
As jQuery is asynced, on most browsers, by the time the code put by Ultimate Member executes, jQuery is yet to be defined, and because jQuery is undefined, it breaks my site from functioning properly.
Please support me by telling some method, to have it in a JS file rather than Inline HTML, or some alternative way to ensure that it does not make my site partially unfunctional.
The page I need help with: [log in to see the link]
- The topic ‘Ultimate Member Echos Inline JS Breaking Site’ is closed to new replies.