New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.chosen().change() not working #383
Comments
Fixed by wrapping it in $(document).ready(function() { }); |
I am seeing the same behavior - I have it wrapped in: $(document).ready(function() {
$(".chzn-select").chosen().select(alert());
}); I am using jquery 1.7.1 |
Sam - were you able to resolve this? I'm working with it now and the below code is not logging anything in my console. $(document).ready(function () {
$('#season').chosen().change(function () {
console.log('asdf');
});
}); |
@bkuhl It has been some time but I think this is what ended up working for me: $(".chzn-select").chosen().change(function (event) {
log('change', event, $(event.target).val());
}); |
it helps for me just roll back to 0.9.5 version :) |
var choice, close_link,
_this = this;
choice = $('<li />', {
"class": "search-choice"
}).html("<span>" + item.html + "</span>");
if (item.disabled) {
choice.addClass('search-choice-disabled');
} else {
close_link = $('<a />', {
"class": 'search-choice-close',
'data-option-array-index': item.array_index
});
close_link.bind('click.chosen', function(evt) {
return _this.choice_destroy_link_click(evt);
});
choice.append(close_link); want to ask,how to addClass to |
This works perfectly for me. If someone was looking for CoffeeScript implementation, its here: $('.myselect').chosen().change(
(event) ->
console.log "data changed"
) |
i have same thing here. no solution worked for me! |
Hi, I am wanting to update the the options in one chosen based on the value selected in another, using AJAX.
I have the underlying AJAX code working great on standard selects, but when I try either of the following two code snippets to trigger a change, it does not work.
I get the alert() on page load, but not when I change the value of the select with id "categories"
[code]
$("#categories").chosen().select(alert());
$("#categories").chosen().change(alert());
[/code]
The text was updated successfully, but these errors were encountered: