jquery soundcloud play/stop

How can I add the CSS-Class "playSound", during the track plays?

        var widget = SC.Widget(document.getElementById('soundcloud_widget'));

        /*widget.bind(SC.Widget.Events.READY, function()


        //jQuery(".stopSound").live("click", function()


I have never used SoundCloud, but it appears that you are trying to use the same element to both play and stop. If that is the case, this should work:

    jQuery(this).toggleClass("playSound stopSound");

The click event will presumably be bound to a single element. The selector .playSound,.stopSound is to make sure it selects the element regardless of what class it starts out with. .toggleClass() will remove class if they are in the list or add classes if they are not. And I'm assuming widget.toggle() was working as expected.

Need Your Help

How to get a Facebook access token on iOS

iphone facebook access-token

iOS beginner here. I have the following code:

Emberjs, server side vs client side, All in?

php javascript rest yii ember.js

I have been looking into Ember.js, and it looks really great, but one thing that concerns me, and that I can't get my mind around it, is if I start using it on an already running project.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.