Jump to content

Embedding Soundcloud widget with code

Recommended Posts

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
  • Replies 1
  • Views 1.3k
  • Created
  • Last Reply

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>

<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>
      $(document).ready(function() {
        var widget = SC.Widget(document.getElementById('soundcloud_widget'));
        widget.bind(SC.Widget.Events.READY, function() {

        $('play').click(function() {widget.toggle(); });

        $('next').click(function() {widget.next();  });

        $('prev').click(function() {widget.prev();  });



Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.