i have a code like this
<script>$(document).ready(function(){
var myPlayList = [];
//document.write(whatTo);
//New instance of jPlayerSkin
var skin = new jPlayerSkin( '#jplayer_container' , myPlayList );
//Start the player
skin.initialize();
});
</script>
and i have function , which is function updatePlaylist(song,title,url) { /* code */ }
Now all i want is to execute this updatePlaylist function in document.ready because in this function i also call skin.add() , which is available in document.ready only. But when i place the function in document.ready() , i can’t execute it, and if i put it outside, i can execute the function but it can’t access skin.add().
move
var myPlayList = [];andvar skin = nulloutside of the document.ready, try again withupdatePlaylist(song,title,url)in document.ready