FeliciaOctocog Posted November 15, 2022 Share Posted November 15, 2022 I'm trying to inject an H1 element above the default H2 element on the video pages. (ex: https://www.sawyerfree2025.org/videos/v/leslie-niavah-friday) I created this code to perform this injection, but it is not working. <script> $(document).ready(function() { $('<h1>Testimonials</h1>').insertBefore('.lesson-details-title'); }); </script> This and other methods I have tried have not worked. I am adding the code to the Page Header Code Injection under Video Settings. Link to comment
creedon Posted November 15, 2022 Share Posted November 15, 2022 You are using jQuery code but you have not installed jQuery. Add the following to Settings > Advanced > Code Injection > HEADER. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script> 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
FeliciaOctocog Posted November 21, 2022 Author Share Posted November 21, 2022 Wow, I missed that. You are right. That fixed it. Thanks! creedon 1 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