Sha256: be6e662a10e85c78948c66c0f7645cb04554455d09303832ee6b7b59ce1eeb91

Contents?: true

Size: 454 Bytes

Versions: 1

Compression:

Stored size: 454 Bytes

Contents

(function( $ ){
  
  $.fn.foundationAlerts = function(options) {
    var settings = $.extend({
      callback: $.noop
    }, options);
    
    $(".alert-box", this).delegate("a.close", "click", function(event) {
      event.preventDefault();
      $(this).closest(".alert-box").fadeOut(function(event){
        $(this).remove();
        // Do something else after the alert closes
        settings.callback();
      });
    });
    
  };

})( jQuery );

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zurb-foundation-3.0.6 vendor/assets/javascripts/foundation/jquery.foundation.alerts.js