Brian55 Posted July 21, 2021 Share Posted July 21, 2021 Site URL: https://www.elementhfp.com/memberships Hello, I have code supplied by Minbody for clients to Login or Register to their account. (Top left of my website) This is set up as a link in the primary navigation of the website. Link works and is functional however, when one opens the webpage the code displays in raw format to the user. This is the same case for the pricng links located on the membership page. The code used is as follows: Login | Register: <script src="https://widgets.mindbodyonline.com/javascripts/healcode.js" type="text/javascript"></script><healcode-widget data-version="0.2" data-link-class="loginRegister" data-site-id="102690" data-mb-site-id="5721400" data-bw-identity-site="false" data-type="account-link" data-inner-html="Login | Register" /> Sample Link (There are many): <script src="https://widgets.mindbodyonline.com/javascripts/healcode.js" type="text/javascript"></script><healcode-widget data-version="0.2" data-link-class="healcode-contract-text-link" data-site-id="102690" data-mb-site-id="5721400" data-bw-identity-site="false" data-type="contract-link" data-inner-html="Buy Now" data-service-id="107" /> Does anyone know how I can stop the raw code appearring to website users as the page loads. Thanks in advance! Mitchp76 1 Link to comment
creedon Posted July 21, 2021 Share Posted July 21, 2021 Please see the following threads. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
Brian55 Posted July 28, 2021 Author Share Posted July 28, 2021 @creedon Thanks very much for your help. The second thread is not displaying for me (permissions it says). WOuld you have another link? Thanks Brian Link to comment
creedon Posted July 29, 2021 Share Posted July 29, 2021 Quote The second thread is not displaying for me (permissions it says). WOuld you have another link? Odd. Here is the URL for the whole thread. https://forum.squarespace.com/topic/185087-unwanted-code-showing-up-in-nav/ Let us know how it goes. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
Brian55 Posted August 7, 2021 Author Share Posted August 7, 2021 No Still no luck with it unfortutely. The code in the first like. Seems to disrupt the Mindbody appointment widget and make the date buttons bigger. (I have removed the code and dates revert to original style) Header: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> Footer: <script> $( ( ) => { /* add mindbody login register link to navigation Version : 0.1d0 SS Version : 7.1 By : Thomas Creedon < http://www.tomsWeb.consulting/ > */ const dataSiteId = '102690'; const dataMbSiteId = '5721400'; // do not change anything below, there be the borg here $( '<script src="https://widgets.mindbodyonline.com/javascripts/healcode.js" type="text/javascript"><\/script>' + '<healcode-widget data-version="0.2" data-link-class="loginRegister" data-site-id="' + dataSiteId + '" data-mb-site-id="' + dataMbSiteId + '" data-type="account-link" data-inner-html="Login | Register" />' ) .appendTo ( '.header-nav-list, .header-menu-nav-folder-content' ); $( 'healcode-widget:first' ) .addClass ( 'header-nav-item header-nav-item--collection header-nav-item--active' ) .attr ( 'data-animation-role', 'header-element' ); $( 'healcode-widget:last' ) .addClass ( 'container header-menu-nav-item header-menu-nav-item--collection' ); } ); </script> Any idea on a fix? Screen shot attached. Thanks in advance! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment