Skip to content

Commit

Permalink
Fixing issue with random button on web page.
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkside138 committed Nov 12, 2016
1 parent 34107c2 commit 624af8e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main/webapp/js/soundboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,20 @@ $(document).ready(function() {
}
});

$(".randomButton").click(function() {
var volume = $('#volume').slider("option", "value");
$.ajax({
url: "/soundsApi/volume?volume=" + volume,
method: 'POST'
});

var username = $(".userNameSelect option:selected").text();
$.ajax({
url: "/soundsApi/playRandom?username=" + username,
method: 'POST'
});
});

$("#volume").slider({
min: 0,
max: 100,
Expand Down

0 comments on commit 624af8e

Please sign in to comment.