jquery - Javascript only works with alert (); -
my code works perfect if use alert();
in between. if don't use it, part after //alert()
; doesn't executed.
function playerleer() { $('#pplay').css('background', 'url("images/play.png")'); $('#player').get(0).pause(); $('#player').attr('src',null); $('.song').html(null); alert(); $('#seekslider').val(0); $('#curtimetext').html('0:00'); $('#durtimetext').html('0:00'); }
what do?
thanks responds :)
janik have tried using chrome debugger or javascript debugger?
basically if type debugger in script so
function playerleer() { $('#pplay').css('background', 'url("images/play.png")'); $('#player').get(0).pause(); $('#player').attr('src',null); $('.song').html(null); debugger; $('#seekslider').val(0); $('#curtimetext').html('0:00'); $('#durtimetext').html('0:00'); }
as long have browser debugger open (f12) when run javascript console hit debugger , pause, there can view variables , step step, alternatively can open google chrome, press f12 key, go sources, locate script , click on line want debug
here image example here link chrome debugger tutorial https://developer.chrome.com/devtools/docs/javascript-debugging
Comments
Post a Comment