Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var sel = $('.cmb2_select'),
- opt = $('option:not(:first-child)', sel);
- function review(){
- var chosen = sel.map(function(i, el){
- return $(':selected',el);
- });
- var teamId = 0;
- opt.show();
- chosen.each(function(i, el){
- teamId = $(el).val();
- opt.not(el).filter(function(){
- return $(this).val() == teamId;
- }).hide();
- });
- return false;
- }
- sel.on('change',review);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement