Forked from davidbrooks/module_pattern_boilerplate.js
Last active
August 29, 2015 13:56
-
-
Save adrianrodriguez/9120029 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var interaction = (function($, window, undefined) { | |
// These are some global variables. | |
var example_a = ''; | |
// This is a standard document ready from jQuery. It allows the script to self-start. | |
$(document).ready(function(){ | |
interaction.init(); | |
var total = setInterval(function(){ | |
interaction.totals(); | |
}, 50); | |
}); | |
return { | |
init: function(){ | |
// These things happen when the page is loaded | |
interaction.clicks(); | |
}, | |
clicks: function(){ | |
// Watch some clicks here | |
}, | |
totals: function() { | |
if ($('.PO_total').length) { | |
var text = $('.PO_total').text(); | |
console.log(text); | |
clearInterval(total); | |
} | |
} | |
}; | |
})(jQuery, this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment