Commit 180e3af7 by Giulio Gratta

Name full-screen-image setup function and call it

This change sets up "Full Screen Image" JS everytime courseware tabs are clicked, as they are js/templates and not available in the DOM on page load.
parent 9c030168
$(function() {
// Set up on page load
function setupFullScreenImage() {
$("a.modal-content").each(function() {
var smallImageObject = $(this).children();
var largeImageSRC = $(this).attr('href');
......@@ -106,4 +104,4 @@ $(function() {
$(".wrapper-modal-image .image-content .image-controls .modal-ui-icon").toggleClass('is-disabled');
}
});
});
\ No newline at end of file
}
......@@ -4,4 +4,5 @@ metadata:
data: |
<h2>Full Screen Image</h2>
<p>Use the full screen image tool to allow students to open the image in the full screen, zoom in on the image, and drag the image within the screen.</p>
<a href="http://static.class.stanford.edu/stanford-hills-big.jpg" class="modal-content"><img alt="The Stanford Hills" src="http://static.class.stanford.edu/stanford-hills-small.jpg" /></a>
\ No newline at end of file
<a href="http://static.class.stanford.edu/stanford-hills-big.jpg" class="modal-content"><img alt="The Stanford Hills" src="http://static.class.stanford.edu/stanford-hills-small.jpg" /></a>
<script>$(function () {setupFullScreenImage();});</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment