I have searched lot for this answer but there is no near answer for it.
Actually my dropdown have lot of options.So, to limit that options I have used Jquery.dropdownreplacement.Now, it is limiting my options as defined.But, I have more than one select statements in one page then it is creating a problem.So i did something like this
$("select").each(function(){
var filter = $(this);
$('#'+ filter.attr('id')).dropdownReplacement({optionsDisplayNum: 10});
});
After this according to the ‘id’ it limits the select options.But, here my select element already have onChange which have different functionality in different pages.After adding this plugin the onchange functinality is lost.To limit the options and make my onchange functinality work at a time what should i do? I don’t know whether i’m doing it in correct way or i missed something.Or onchange functionality will not work for this dropdownreplacement?
I solved my problem by doing this:
$("select").each(function(){var filter = $(this);
$('#' + filter.attr('id')).dropdownReplacement({optionsDisplayNum: your_limit,
onSelect : function(value, text, selectIndex) {
$('#'+filter.attr('id')).trigger('change');
}});
});
Thank you guys…