[Solved] i want to store a value in jquery var and pass it [closed]


All of your code needs to be in $(document).ready function.. Like this:

$(document).ready(function() {
    //You can alternatively pass an object:
    $('#player').youTubeEmbed({
        video: 'http://www.youtube.com/watch?v=uyeJXKfAcpc',
        width: 640,
        // Height is calculated automatically
        progressBar: true // Hide the progress bar
    });

    var yid = $("input[name="youtube-id"]").val();
    $('#player').youTubeEmbed({
        video: 'http://www.youtube.com/watch?v=' + yid,
        width: 640,
        // Height is calculated automatically
        progressBar: true // Hide the progress bar
    });
}); // THE END OF YOUR $(document).ready function

0

solved i want to store a value in jquery var and pass it [closed]