Dear All
I am using following script to load a video from YouTube.com
- $('.samplevideolist').click(function(){
- $('#samplevideodiv').slideDown(1000);
- // $('#foo').show();
- var id=this.id;
- var arr=id.split('samplevideos');
- var videoid=arr[1];
-
- $('#videoid').val(videoid);
-
- $.getJSON("sampleyoutubevideojsonfill.php", {id: $('#videoid').val()}, function(data){
- $('#samplevideonamediv').text(data['name']);
-
- $('#samplevideo').html(data['code']);
- }).done(alert('ttt') ); // Displays alert ttt
- });
-
- }).fail(function(){
- alert("OUCH!")
- });
-
-
-
- })(jQuery);
So as to auto play this video