forked from braintree/braintree_php_example
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathresponse.js
More file actions
35 lines (27 loc) · 837 Bytes
/
response.js
File metadata and controls
35 lines (27 loc) · 837 Bytes
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
$(function(){
function Response(){
this.view = $('body');
this.backButtons = $('.back');
this.transitionend = 'webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend';
this.initialize();
}
Response.prototype.initialize = function(){
this.events();
};
Response.prototype.events = function(){
var self = this;
// this.backButtons.on('click', function(event){
// self.backHandler(event);
// });
};
Response.prototype.backHandler = function(event){
var href = (window.location.origin + $(event.target).attr('href')) || window.location.origin;
this.view.addClass('out');
window.setTimeout(function(){
// window.location = href;
console.log(href);
},1000);
// event.preventDefault();
};
var response = new Response();
});