-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
45 lines (42 loc) · 1.23 KB
/
index.html
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
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<title>Modal</title>
<link rel="stylesheet" href="assets/stylesheets/modal.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script>
<script src="assets/javascripts/modal.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript" charset="utf-8">
$(function() {
$('a#click-modal').on('click', function(e){
e.preventDefault();
// Version Normal
// var text = $("p").clone();
// modal.open({
// content: text,
// height: 300,
// width: 400
// });
// Version con AJAX
$.ajax({
url: "ajax.html",
dataType: 'html',
success: function(data) {
modal.open({
content: data,
width: 400,
height: 300
});
},
error: function(){
alert("didnt work");
}
});
});
});
</script>
</head>
<body>
<a id="click-modal" href="#">Click Me</a>
</body>
</html>