Menu icon Foundation

My Posts






My Comments

Julian Claus commented on Julian Claus's post about 4 years

Your first solution gave my a correct output. Unless there is no other way I'll stay with this, thanks for your quick help!

Julian Claus commented on Julian Claus's post about 4 years

Thanks, Bob. I thought a row must result in 12. 4 + 4 + 4 or 6 + 6.

Julian Claus commented on Julian Claus's post over 4 years

@Rafi Benkual that did it, thanks!

Julian Claus commented on Julian Claus's post over 4 years

Yes, I tried that, no success. It works when I open the page containing the AJAX result but not through the AJAX request.

Julian Claus commented on Julian Claus's post almost 5 years

Yeah, that was my first solution, too. It seems like there is no other. I'll do it, thanks!

Julian Claus commented on Julian Claus's post almost 5 years

Thanks, but it's still not working. Maybe because I have an older version? Please check the site that it's about:

http://www.finca-sacabana.com/de/

At the very top there is a langauge switch.

Julian Claus commented on Julian Claus's post almost 5 years

Sorry, I can't get it to work. This is my code:

 ;(function ($, window, document, undefined) {
  'use strict';

  Foundation.libs.alert = {
    name : 'alert',

    version : '5.3.1',

    settings : {
      callback: function (){}
    },

    init : function (scope, method, options) {
      this.bindings(method, options);
    },

    events : function () {
      var self = this,
          S = this.S;

      $(this.scope).off('.alert').on('click.fndtn.alert', '[' + this.attr_name() + '] a.close', function (e) {
          var alertBox = S(this).closest('[' + self.attr_name() + ']'),
              settings = alertBox.data(self.attr_name(true) + '-init') || self.settings;

        e.preventDefault();
        if (Modernizr.csstransitions) {
          alertBox.addClass("alert-close");
          alertBox.on('transitionend webkitTransitionEnd oTransitionEnd', function(e) {
            S(this).trigger('close').trigger('close.fndtn.alert').remove();
            settings.callback();
          });
        } else {
          alertBox.fadeOut(300, function () {
            S(this).trigger('close').trigger('close.fndtn.alert').css("visibility", "hidden");
            settings.callback();
          });
        }
      });
    },

    reflow : function () {}
  };
}(jQuery, window, window.document));

What I am doing wrong here? I have also tried to completely remove the .fadeout() function.

Julian Claus commented on Julian Claus's post almost 5 years

"Try to bind the new closing function to the "close.fndtn.alert-box" event for production code instead of changing the foundation.js like it is described in the documentation."

That would have been my second question. Thank you, I will give it a try.

Julian Claus commented on Julian Claus's post almost 5 years

Hey, thanks for you answer.

With the transition effect turned off the alert box object isn't removed and doesn't make room for another object.

You can see it here:

http://foundation.zurb.com/docs/components/alert_boxes.html

If you click on the x the next object goes to the place where the alert box was.

Posts Followed


Following

    No Content

Followers

My Posts

My Comments

You commented on Julian Claus's post about 4 years

Your first solution gave my a correct output. Unless there is no other way I'll stay with this, thanks for your quick help!

You commented on Julian Claus's post about 4 years

Thanks, Bob. I thought a row must result in 12. 4 + 4 + 4 or 6 + 6.

You commented on Julian Claus's post over 4 years

@Rafi Benkual that did it, thanks!

You commented on Julian Claus's post over 4 years

Yes, I tried that, no success. It works when I open the page containing the AJAX result but not through the AJAX request.

You commented on Julian Claus's post almost 5 years

Yeah, that was my first solution, too. It seems like there is no other. I'll do it, thanks!

You commented on Julian Claus's post almost 5 years

Thanks, but it's still not working. Maybe because I have an older version? Please check the site that it's about:

http://www.finca-sacabana.com/de/

At the very top there is a langauge switch.

You commented on Julian Claus's post almost 5 years

Sorry, I can't get it to work. This is my code:

 ;(function ($, window, document, undefined) {
  'use strict';

  Foundation.libs.alert = {
    name : 'alert',

    version : '5.3.1',

    settings : {
      callback: function (){}
    },

    init : function (scope, method, options) {
      this.bindings(method, options);
    },

    events : function () {
      var self = this,
          S = this.S;

      $(this.scope).off('.alert').on('click.fndtn.alert', '[' + this.attr_name() + '] a.close', function (e) {
          var alertBox = S(this).closest('[' + self.attr_name() + ']'),
              settings = alertBox.data(self.attr_name(true) + '-init') || self.settings;

        e.preventDefault();
        if (Modernizr.csstransitions) {
          alertBox.addClass("alert-close");
          alertBox.on('transitionend webkitTransitionEnd oTransitionEnd', function(e) {
            S(this).trigger('close').trigger('close.fndtn.alert').remove();
            settings.callback();
          });
        } else {
          alertBox.fadeOut(300, function () {
            S(this).trigger('close').trigger('close.fndtn.alert').css("visibility", "hidden");
            settings.callback();
          });
        }
      });
    },

    reflow : function () {}
  };
}(jQuery, window, window.document));

What I am doing wrong here? I have also tried to completely remove the .fadeout() function.

You commented on Julian Claus's post almost 5 years

"Try to bind the new closing function to the "close.fndtn.alert-box" event for production code instead of changing the foundation.js like it is described in the documentation."

That would have been my second question. Thank you, I will give it a try.

You commented on Julian Claus's post almost 5 years

Hey, thanks for you answer.

With the transition effect turned off the alert box object isn't removed and doesn't make room for another object.

You can see it here:

http://foundation.zurb.com/docs/components/alert_boxes.html

If you click on the x the next object goes to the place where the alert box was.

Posts Followed

Following

  • No Content

Followers

  • No Content