-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathfancy.html
More file actions
53 lines (48 loc) · 2.02 KB
/
fancy.html
File metadata and controls
53 lines (48 loc) · 2.02 KB
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
52
53
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>A Custom Campaign Monitor Subscribe Button</title>
<link href="css/fancy.css" rel="stylesheet" type="text/css" />
<link href='http://fonts.googleapis.com/css?family=Droid+Serif:400,700' rel='stylesheet' type='text/css'>
<meta name="viewport" content="initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="author" content="Buzz Usborne - www.buzzusborne.com">
</head>
<body>
<!-- Button -->
<a data-toggle="modal" data-target="#modal" href="javascript://" id="button">Subscribe to our newsletter</a>
<!-- Modal -->
<div id="modal" class="modal hide">
<form action="http://delivery.prevue.it/t/r/s/jdditkj/" method="post" id="subForm">
<a class="close" href="javascript://" data-dismiss="modal">×</a>
<h1>Get our newsletter</h1>
<h2>Want the latest and greatest from our blog straight to your inbox? Chuck us your details and get a sweet weekly email.</h2>
<input type="text" name="cm-name" placeholder="Your name" />
<input type="email" spellcheck="false" name="cm-jdditkj-jdditkj" id="email" placeholder="Your email address" />
<button type="submit" value="Subscribe">Subscribe</button>
<div id="response">Thanks! You're subscribed</div>
</form>
</div>
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<!-- Twitter Bootstrap Modal: http://twitter.github.io/bootstrap/javascript.html#modals -->
<script src="js/modal.js"></script>
<!-- Campaign Monitor AJAX Subscribe: https://gist.github.com/jdennes/1155479 -->
<script type="text/javascript">
$(function () {
$('#subForm').submit(function (e) {
e.preventDefault();
$('#email').removeClass();
$('button').fadeTo(200,0.5);
$.getJSON(
this.action + "?callback=?",
$(this).serialize(),
function (data) {
$('button').stop().fadeTo(200,1);
if (data.Status === 400) { $('#email').addClass('error'); } else { $('#response').show(); }
});
});
});
</script>
</body>
</html>