js/super_select.js
// This function checks if a selected value has already been selected before or not
This function checks if a selected value has already been selected before or not
This function checks if a selected value has already been selected before or not
function isUnique(element) {
        var status;
        $('#selected-elements > span').each(function() {
            var value = $(this).attr('data-value');
            if (element == value) {
                status = 'not unique';
            }
        });
        if (status == 'not unique') {
            return false;
        } else {
            return true;
        }
    }
function isUnique ( element ) { var status ; $ ( '#selected-elements > span' ) . each ( function ( ) { var value = $ ( this ) . attr ( 'data-value' ) ; if ( element == value ) { status = 'not unique' ; } } ) ; if ( status == 'not unique' ) { return false ; } else { return true ; } }
This function checks if a selected value has already been selected before or not
This function checks if a selected value has already been selected before or not