Was noticing on this post: http://drupal.org/node/797772 comment 15 discusses auto-submit functionality and bef checkall functionality. I also found that the great tutorial on this node: http://drupal.org/node/766974 has a jquery slider that doesn't work with an auto-submit solution. And think it would be great if there were some easy way to fix/add that.

Thanks,
Joseph

Comments

doublejosh’s picture

+1

YK85’s picture

+1 subscribing

schnorte’s picture

subscribing

samhassell’s picture

subscribing

nuez’s picture

subscribe (also for drupal 7)

sleepingmonk’s picture

If you want your slider to auto-submit, add a "stop:" event to your .slider call.
eg:

$('<div></div>').slider({
                  range: true,
                  min: 0,     // Adjust slider min and max to the range
                  max: 10,    // of the exposed filter.
                  values: [init_min, init_max],
                  slide: function(event, ui){
                    // Update the form input elements with the new values when the slider moves
                    min.val(ui.values[0]);
                    max.val(ui.values[1]);
                  },
                  stop: function(event, ui){
                    $(this).parents('form').submit();
                  }
...

See the function on the stop: event near the bottom of the code. I think that's what you're asking for. Hope that helps.

dazz’s picture

using the .submit() does work but it reloads the page and doesn't use ajax to filter the content.

in the stop event you can do a click event on the auto submit button.

stop: function(event, ui){
    $(this).parents('form').find('.ctools-auto-submit-click').click();
},
Wappie08’s picture

Nice!! Thanks dazz!

mikeker’s picture

Status: Active » Fixed

Based on #6 and #7, I'm marking as fixed.

Thanks sleepingmonk and dazz for sharing!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

a.ross’s picture

Is there any chance this can be added in the module as an option?