MansidakS Posted June 2, 2020 Share Posted June 2, 2020 Hi all! So I've been trying to add a custom code to my Squarespace site for few days now and nothing seems to be working out. The code works like a charm on jsfiddle but when I try to put it in the website, it doesn't work at all. I've tried putting it at all the appropriate placed (code injection, header, code block, footer, banner etc.) Basically the three buttons in the body tag don't work. The soundcloud widget plays the music but I want to control the buttons to work as well. Any kind of support would be really appreciated. It's kinda urgent so a quick response would mean a lot. Link to comment
tuanphan Posted June 9, 2020 Share Posted June 9, 2020 Hi. Which code did you insert? Try this to Code Block <iframe id="soundcloud_widget" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/playlists/352221151&color=%23060a10&auto_play=true&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true" width="420" height="240" frameborder="no"></iframe> <play>Play/Pause</play> <next>Skip</next> <prev>Previous</prev> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script src="http://w.soundcloud.com/player/api.js"></script> <script> $(document).ready(function() { var widget = SC.Widget(document.getElementById('soundcloud_widget')); widget.bind(SC.Widget.Events.READY, function() { console.log('Ready...'); }); $('play').click(function() {widget.toggle(); }); $('next').click(function() {widget.next(); }); $('prev').click(function() {widget.prev(); }); }); </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care 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