Use the shortcut `$('#split-btn').click(function() { ... });` instead. http://api.jquery.com/click/