-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
51 lines (45 loc) · 1.13 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
(function($, global){
"use strict";
// img
let modal01 = uiModale({
onClickContent: function($el, $content){
let href = $el.attr("data-link");
$content.on("click", function(){
location.href = href;
});
},
onClose: function(){
}
});
// iframe
var modal02 = uiModale({
root : ".js-modale-iframe",
type : "iframe",
closeEl: "#js-modaleClose",
btn : true,
btnStr : "閉じる"
});
// youtube
var modal02 = uiModale({
root: ".js-modale-youtube"
});
// div
let modaldiv = uiModale({
root : ".js-modale-div",
onOpen: function(){
console.log("open");
},
onClose: function(){
console.log("close");
}
});
$(".close_modal_btn").on("click", function(){
for (let i = 0; i < modaldiv.length; i++) {
modaldiv[i].close();
}
});
let modaldivclone = uiModale({
root : ".js-modale-div-clone",
clone: true
});
})(jQuery, (this || 0).self || global);