Menu icon Foundation

My Posts

No Content

My Comments

Simon G. commented on b c's post over 4 years

This is very annoying indeed and needs to be fixed

Simon G. commented on Matt Pilott's post over 4 years

I've actually just found a workaround. I define an onAfterChange event handler and in it reset the sliders to their current value after each change of slide:

 $(document).ready(function() {
  $('.questions').slick({
    dots: true,
    adaptiveHeight: true,
    draggable: false,
    onAfterChange: function () {
      $('.range-slider').foundation('slider', 'set_value', $(this).attr('data-slider'));
    }
  });
});

God knows why, but it works now :-)

Posts Followed

  • 5
    Replies
  • onchange event called multiple times

    By b c

    slideronchange

    I found that the onchange handler for a slider I created was executed 4 times upon first loading of the webpage, and at least twice for each time the slider was moved. Is this expected behaviour? I'd rather not have the the onchange event execute a... (continued)

    Last Reply by Marc Guay almost 4 years ago



Following

    No Content

Followers

My Posts

No Content

My Comments

You commented on b c's post over 4 years

This is very annoying indeed and needs to be fixed

You commented on Matt Pilott's post over 4 years

I've actually just found a workaround. I define an onAfterChange event handler and in it reset the sliders to their current value after each change of slide:

 $(document).ready(function() {
  $('.questions').slick({
    dots: true,
    adaptiveHeight: true,
    draggable: false,
    onAfterChange: function () {
      $('.range-slider').foundation('slider', 'set_value', $(this).attr('data-slider'));
    }
  });
});

God knows why, but it works now :-)

Posts Followed


Following

  • No Content

Followers

  • No Content