I found this jfiddle from another post on here.
Original: http://jsfiddle.net/ZTF5J/2/
With 1.9 and my changes: http://jsfiddle.net/4423c/
Looks like .live()
is no longer supported with Jquery 1.9. I managed to modify a portion of the code to remove the dropdown menu, but adding a new filter doesn't work properly.
The following code allows you to remove a filter at a time. However, when adding a new filter, it doesn't check to see if a value currently exist.
$('body').on('click', '.closeselect', function(){
if($('.closeselect').length > 1) {
$(this).parent().remove();
disableSelectedOption();
$('#addmore').show();
}
});
I've tried modifying the other portion where it checks the select value. Obviously it doesn't work properly.
$('body').on('change', '.mySelect', function(){
disableSelectedOption();
});