Caption for an iframe element?
See original GitHub issueHas anybody gotten a caption on an iframe element to work?
I have tried various codes that I found here, even one by @dimsemenov (https://github.com/dimsemenov/Magnific-Popup/issues/262), but none seem to work.
Here’s my code which is based on the issue linked above:
jQuery(document).ready(function() {
var url = 'http://google.com';
var title= 'test';
$.magnificPopup.open({
items: { src: url },
type: 'iframe',
markup: '<div class="mfp-iframe-scaler">'+
'<div class="mfp-close"></div>'+
'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+
'<div class="mfp-bottom-bar">'+
'<div class="mfp-title"></div>'+
'</div>'+
'</div>',
titleSrc: function(item) {
return title;
},
});
});
Issue Analytics
- State:
- Created 9 years ago
- Comments:8
Top Results From Across the Web
Be Sure to Provide Titles for Iframes | Accessibility Tips
When an iframe is given a meaningful title, screen reader users can pull up a list of frames and identify the content or...
Read more >Text after iframe? - javascript - Stack Overflow
Place the <iframe> in an element (I used a <figure> ) that is position ed relative . position: absolute for the <iframe> and...
Read more >HTML iframe tag - W3Schools
Definition and Usage. The <iframe> tag specifies an inline frame. An inline frame is used to embed another document within the current HTML...
Read more ><iframe>: The Inline Frame element - HTML - MDN Web Docs
Warning: Because each browsing context is a complete document environment, every <iframe> in a page requires increased memory and other ...
Read more >HTML iframe title Attribute - Dofactory
HTML iframe title -- the best examples. The title attribute on an iframe element adds a tooltip with title text to that element....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can take a look at the html I’m working with here: https://1beat.org/videos/
<div class="playlist_container">
open up youtube videos in an iframeSadly now there is less control over the youtube iframe display so you see the title on the video too. LOL…