loading...

How to Load Youtube with AJAX?

mzaini30 profile image Zen ・1 min read

Like this:

$(".youtube").load("https://youtube.com")

I got error: CORS

Discussion

markdown guide
 

Will you please elaborate your use case please? You want to embed a youtube video in HTML page and loading the url with ajax? Or something else?

 

I was edited my post.

 

Well I am assuming you have a class in html tag or div where you want to load any youtube video or page. You can use iframe or embed tag instead I guess!