Menu icon Foundation

Developer

My Posts

No Content

My Comments

michael febrianto commented on tomex's post almost 3 years

Hi guys,
I recently have to faced this kind of issue too.
My solution probably only works for form with limited number of inputs, such as login form.
Here is the solution :
$('#login').focusout(function() {
$('input, textarea, select').off('.abide');

    $("#password").focus(function(){
      console.log("focus out password");
      $('input, textarea, select').on('.abide');
      Foundation.libs.abide.validate($('form').find('#login'), {type:''})
    })

  });

  $("#password").focusout(function() {
    $('input, textarea, select').on('.abide');
    Foundation.libs.abide.validate($('form').find('#password'), {type:''})
  });</code></pre>

Let me know what you think about it.
Basically general knowledge that I got is focusout is called before blur.fndtn.abide so we can overwrite behaviour of blur.fndtn.abide by using focusout.
God Bless,
Michael Febrianto.

Posts Followed


Following

    No Content

Followers

My Posts

No Content

My Comments

You commented on tomex's post almost 3 years

Hi guys,
I recently have to faced this kind of issue too.
My solution probably only works for form with limited number of inputs, such as login form.
Here is the solution :
$('#login').focusout(function() {
$('input, textarea, select').off('.abide');

    $("#password").focus(function(){
      console.log("focus out password");
      $('input, textarea, select').on('.abide');
      Foundation.libs.abide.validate($('form').find('#login'), {type:''})
    })

  });

  $("#password").focusout(function() {
    $('input, textarea, select').on('.abide');
    Foundation.libs.abide.validate($('form').find('#password'), {type:''})
  });</code></pre>

Let me know what you think about it.
Basically general knowledge that I got is focusout is called before blur.fndtn.abide so we can overwrite behaviour of blur.fndtn.abide by using focusout.
God Bless,
Michael Febrianto.

Posts Followed


Following

  • No Content

Followers

  • No Content