(function ($) {
-
- $.fn.foundationButtons = function(options) {
+
+ $.fn.foundationButtons = function(options) {
// Prevent event propagation on disabled buttons
- $('.button.disabled', this).on('click.fndtn', function (event) {
- event.preventDefault();
+ $(document).on('click.fndtn', '.button.disabled', function (e) {
+ e.preventDefault();
});
-
+
$('.button.dropdown > ul', this).addClass('no-hover');
- $(document).on('click.fndtn', '.button.dropdown', function (e) {
- $('.button.dropdown, .button.dropdown.split span', this).on('click.fndtn', function (e) {
++ $(document).on('click.fndtn', '.button.dropdown, .button.dropdown.split span', function (e) {
// Stops further propagation of the event up the DOM tree when clicked on the button.
// Events fired by its descendants are not being blocked.
if (e.target === this) {