Passing Value Of Html To Jquery File
I have a script like this, and it runs well! the jQuery file: $(document).ready(function(){ //You can alternatively pass an object: $(
Solution 1:
You are declaring a variable inside an object, move it to above the youTubeEmbed
plugin, also use the .val()
method to access the input's value.
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
});
Post a Comment for "Passing Value Of Html To Jquery File"