Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
-4
rated 0 times [  0] [ 4]  / answers: 1 / hits: 58185  / 11 Years ago, wed, february 27, 2013, 12:00:00

Before I click reset button I choose Company in Chosen (dropdown list). The event occurs normally after I click reset. I choose Company again but event change in dropdownlist doesn't occur.



Could anyone tell me how to trigger the change event for dropdownlist after clicking reset button and then the same element?



The code I have so far:



$(#mainMenu).change(function(e){
e.preventDefault();
loadFirstManu(true);
});


Code for the reset button:



$(#btn_reset).click(function() {
CKEDITOR.instances.ckeditor.setData('');
$('.mchosen').each(function() {
$(this).val('').trigger('liszt:updated');
$('#submenu').attr('disabled', 'disabled').html('');
$('#secondsubmenu').attr('disabled', 'disabled').html('');
$('#s-menu').removeClass('required').html('');
$('#secondsubmenu').removeClass('validate[required]');
$('#tabmenu').attr('disabled', 'disabled').html('');
$('#tab').removeClass('required').html('');
});


});


More From » jquery

 Answers
32

This is what i figured out:



$('#my-select').val(5).trigger(liszt:updated)


liszt:updated is no longer working in new version of chosen instead use below as Alexandru Cojan's answer suggesting



 trigger(chosen:updated);

[#79977] Tuesday, February 26, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
marisela

Total Points: 103
Total Questions: 105
Total Answers: 102

Location: Solomon Islands
Member since Fri, Oct 8, 2021
3 Years ago
;