Created
August 1, 2012 17:49
-
-
Save codexmas/3229207 to your computer and use it in GitHub Desktop.
JQuery; Drupal; Unbinding Ctools autosubmit on exposed filters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Unbind ctools textfield binding | |
$('input[type=text].ctools-auto-submit:not(.ctools-auto-submit-processed),.ctools-auto-submit-full-form input[type=text]:not(.ctools-auto-submit-processed)').unbind('keyup'); | |
// Bind to any textfield widgets that will be auto submitted. | |
$('input[type=text].ctools-auto-submit:not(.ctools-auto-submit-processed),.ctools-auto-submit-full-form input[type=text]:not(.ctools-auto-submit-processed)') | |
.addClass('.ctools-auto-submit-processed') | |
.blur(function () { | |
var form = this.form; | |
if (!$(form).hasClass('ctools-ajaxing')) { | |
$(form).find('.ctools-auto-submit-click').click(); | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment