Closed cawo88 closed 9 years ago
Hey cawo88,
You can do something like this:
$("#pause").hide();
$("#play").hide();
$("#play-all").click(function(){
$("#play-all").hide();
$("#pause").show();
});
$("#pause, #stop").click(function(){
$("#pause").hide();
$("#play").show();
});
$("#play").click(function(){
$("#play").hide();
$("#pause").show();
});
And put all the elements in the same position.
@angelcambero thanks for your solution. But instead of using jQuery, let's stick with AngularJs.
So @cawo88 , I have created a new directive for Play Pause Toggle, here how to use it:
<button play-pause-toggle data-play="Play!" data-pause="Pause!">Play Toggle</button>
You can pass custom Play/Pause html using: data-play and data-pause.
Here is working demo: http://perminder-klair.github.io/angular-soundmanager2/
In Sound Manager.js there is a toggle pause function. How would you create a custom directive for this?