javascript - Image of an embeddable Bandcamp iframe not loading until clicked -
i trying include 2 separate iframes bandcamp static website building friend. using html template allows different sections (via section tag) shown or hidden depending on navigation menu have clicked. code comprised of 7 different sections @ point, , hide , show fine. of elements within each of these sections viewable, however, 2 iframes not display background image unless click on iframe itself. of particular interest if add iframes "home" section (the section shown on page load), images show fine, makes me wonder if there issue regarding "active" class being added , taken away via jquery functions
the jquery block allows hide , show functionality follows:
// global. active menu item var current_item = 0; // few settings var section_hide_time = 1300; var section_show_time = 1300; // jquery stuff jquery(document).ready(function($) { // switch section $(".menu-item", '.mainmenu').click(function() { if( ! $(this).hasclass('active') ) { current_item = this; // close visible divs class of .section $('.section:visible').fadeout( section_hide_time, function() { $('.menu-item', '.mainmenu').removeclass( 'active' ); $(current_item).addclass( 'active' ); var new_section = $( $(current_item).attr('href') ); new_section.fadein( section_show_time ); }); $('.dropdown').removeclass('open'); } return false; }); });
here 1 of iframes reference.
<iframe id="myframe" style="border: 0; width: 350px; height: 350px;" src="https://bandcamp.com/embeddedplayer/album=2807239237/size=large/bgcol=333333/linkcol=e99708/minimal=true/transparent=true/" seamless><a href="http://anthonyprestimusic.bandcamp.com/album/existentialism">existentialism anthony presti</a></iframe>
the folks on @ bandcamp suggested code see if there impeding load of background image, not able duplicate issue. loading iframes generic html page yields no issues @ all. have github pages site set have website, if see is happening. see console error, have not been able figure out error referring to, assume has embed, it's vague.
Comments
Post a Comment