How do you feed HTML directly into the drupal module shadowbox? You can do this with normal shadowbox so there must be some way.

Comments

manfer’s picture

Shadowbox examples at github is a good reference to look for the way to do things https://github.com/mjijackson/shadowbox/blob/master/examples/inline.html As you can see on that example you can have a hidden div to open it in shadowbox.

<p><a rel="shadowbox" href="#shadowbox-content">Click Here to Open Shadowbox</a></p>
<div id="shadowbox-content" style="display:none;">
    <p>This is the content that will appear inside shadowbox</p>
</div>

Shadowbox usage gives you a way to do it with shadowbox API function open http://www.shadowbox-js.com/usage.html So an example could be:

<script type="text/javascript">
$(document).ready(function(){
 $("#shadowbox-button").click(function(){
    Shadowbox.open({
        content:    '<div id="shadowbox-content">This test will appear inside shadowbox</div>',
        player:     "html",
        title:      "Testing Shadowbox",
        height:     250,
        width:      250
    });
  });
});
</script>
<a id="shadowbox-button" href="#">Click Me to Open Shadowbox</a>
nburda’s picture

Thank you so much!

manfer’s picture

Status: Active » Closed (fixed)