Created
May 13, 2014 21:33
-
-
Save Dillie-O/7af848830f112b6252ef to your computer and use it in GitHub Desktop.
jQuery iFrame busting code - updates any links/forms to have iFrame busting target.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(document).ready(function() { | |
if(top.location != location) { | |
$('a, form').each(function() { | |
if(!this.target) { | |
this.target = '_top'; | |
} | |
}); | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment