-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapplication.js
More file actions
40 lines (37 loc) · 1.19 KB
/
application.js
File metadata and controls
40 lines (37 loc) · 1.19 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
$(document).ready( function(){
$('#formsubmit').click(function(e){
console.log("asdf");
e.preventDefault();
var email = $('#email').val();
var name = $('#name').val();
console.log(email+name);
if ((email != 'email address') && name != 'name') { // && (name != '' || 'name') )
$.ajax({
dataType: 'jsonp',
url: "http://getsimpleform.com/messages/ajax?form_api_token=11ea25855a13b79371ce915c054cda86",
data: {
name: name,
email: email,
}
}).done(function() {
//callback which can be used to show a thank you message
//and reset the form
alert("Thank you for leaving your details, you will be added to the mailing list shortly");
$('#email').val('');
$('#name').val('');
});
} else { alert("Your details are incorrect")}
});
// console.log(jQuery('#centreimage').attr('src'));
// console.log(jQuery('#exhibitioncontext').html());
// if (jQuery('#centreimage').attr('src')==(''||undefined))
// { jQuery('#centre').html('');
// }
// if (jQuery('#exhibitioncontext').html()==''){
// jQuery('#exhibitioncontext').hide();
// }
jQuery('#centreimage').fancybox({
height: "40",
autoScale : true,
});
});