I can't for the life of me figure out how to load external page in a modal popup box. I'm using modal popup box from http://dinbror.dk/bpopup/
Since I'm a newb with javascript I can't figure out the documentation. I can load a regular popup box, that's easy for me, but when it comes to loading ajax in modal, I have no idea where to declare this in the html document:
$('element_to_pop_up').bPopup({
contentContainer:'.content',
loadUrl: 'test.html' //Uses jQuery.load()
});
This script supposed to load test.html in a popup, and it does not. It loads a blank popup box instead.
Here is what I tried to do to make this work:
<button id="my-button">Pop it Up</button>
<div id="element_to_pop_up">
<!-- Ajax Javascript that supposed to popup in modal-->
<script>$('element_to_pop_up').bPopup({
contentContainer:'.content',
loadUrl: 'test.html' //Uses jQuery.load()
});</script>
</div>
Any ideas what I'm screwing up?