Permalink
Browse files

Modifying the COOKIE goal recording so that it handles elements loade…

…d via AJAX after page load
  • Loading branch information...
1 parent c5a2c54 commit bdcc800bdcd7a8f22815caa612f4e5bae011c0f6 @sdcooke sdcooke committed Nov 16, 2012
Showing with 2 additions and 7 deletions.
  1. +2 −7 experiments/media/js/experiments.js
@@ -9,11 +9,6 @@ experiments = function() {
};
}();
-$(function(){
- $('[data-experiments-goal]').each(function() {
- $(this).bind('click', function() {
- $.cookie("experiments_goal", $(this).data('experiments-goal'), { path: '/' });
- });
- });
+$(document).delegate('[data-experiments-goal]', 'click', function() {
+ $.cookie("experiments_goal", $(this).data('experiments-goal'), { path: '/' });
});
-

0 comments on commit bdcc800

Please sign in to comment.