Getting the Src of an Injected iFrame with jQuery

Sam Deering

Simple jQuery code snippet to get the src (ie the url) of an injected iframe by simply getting the value of it’s “src” parameter. From here you can access the params in the src.

Also See:

//selector for injected iframe
var iframeSrc = $('#iframe').attr('src');

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.