diff options
Diffstat (limited to 'static/script.js')
-rw-r--r-- | static/script.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/static/script.js b/static/script.js index 354e030..c9d3c40 100644 --- a/static/script.js +++ b/static/script.js @@ -14,7 +14,7 @@ $(document).ready(function () { }); function drawBar(id) { - var canvas = document.getElementById(id); + var canvas = document.getElementById('c_' + id); canvas.height = canvas.height; //clear var context = canvas.getContext("2d"); @@ -151,7 +151,7 @@ function add(id, title) { if (data != 1) return; $('article').append('\ - <section class="song">\ + <section class="song" id="' + id + '">\ <div class="info">\ <a href="http://www.youtube.com/watch?v=' + id + '">' + title + '</a>\ </div>\ @@ -161,7 +161,7 @@ function add(id, title) { <div class="thumb">\ <img src="http://i.ytimg.com/vi/' + id + '/1.jpg" alt="' + id + '">\ </div>\ - <canvas id="' + id + '" width="700" height="20"></canvas>\ + <canvas id="c_' + id + '" width="700" height="20"></canvas>\ <br>\ <img src="/static/player_play.png" alt="Play" onclick="play(\'' + id + '\')" id="play_' + id + '">\ <img src="/static/player_pause.png" alt="Pause" onclick="pause(\'' + id + '\')" id="pause_' + id + '">\ |