Skip to content

Commit 49841a5

Browse files
committed
load gifs on modal open
1 parent d9fdd03 commit 49841a5

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

_includes/modal.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
</div>
55
<div class="modal-content">
66
<h3>{{include.title}}</h3>
7-
<img alt="{{include.title}}" height="450px" width="800px"
8-
src="images/demos/{{include.image}}" />
7+
<img alt="{{include.title}}" height="450px" width="800px" src="#" />
98
</div>
109
</div>

htaccess

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
layout: none
32
permalink: .htaccess
43
---
54
# Compress text files

js/modals.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
$(function() {
2-
$("#atom-coderoad").animatedModal({
3-
modalTarget: 'atom-coderoad-demo',
4-
});
5-
$("#builder-coderoad").animatedModal({
6-
modalTarget: 'builder-coderoad-demo',
7-
});
2+
$("#atom-coderoad").animatedModal({
3+
modalTarget: 'atom-coderoad-demo',
4+
animatedIn:'zoomIn',
5+
animatedOut:'zoomOut',
6+
beforeOpen: function() {
7+
$('#atom-coderoad-demo .modal-content img')
8+
.attr("src", "images/demos/atom-coderoad.gif");
9+
}
10+
});
11+
$("#builder-coderoad").animatedModal({
12+
modalTarget: 'builder-coderoad-demo',
13+
beforeOpen: function() {
14+
$('#builder-coderoad-demo .modal-content img')
15+
.attr("src", "images/demos/builder-demo.gif");
16+
}
17+
});
818
});

js/modals.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)