I'm trying to load an external HTML file in a popup using the Toddish pop-up library (https://github.com/Toddish/Popup).
My situation is as follows: I want to load some HTML stored in an external file into the popup, but the library simply refuses to do this even though I do exactly the same thing as the documentation demo. When I click the link that should trigger the popup, nothing happens. I have the popup.css and jquery.popup.js files in the right location and they are the latest version.
This is testpopup.html:
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Popup test</title>
<link rel="stylesheet" href="popup.css" type="text/css" />
</head>
<body>
<a href="#" id="htmlpopup" class="popup">Click Me!</a>
<script src="jquery.js"></script>
<script src="jquery.popup.js"></script>
<script>
$(document).ready ( function ( ) {
$( "a.popup" ).popup ( );
} );
</script>
</body>
</html>
This is the file I'm trying to load, testcontent.html:
<i>This is some italic!</i>
When I right-click on the link and select Open this page in a new Tab my browser (Firefox 57.0.1) takes me to the page just fine.
I can manually specify the content and than I see a popup with that content. I've thought about just specifying an iframe linking to testcontent.html as a workaround of my issue, but I've always heard iframes are evil so I'd rather not do that.
Is there someone who has a solution?
Thanks very much in advance, Joshua