checkTarget(el) {
        if (el instanceof HTMLElement) { // check for valid dom element
            this.targetElement = el;
        } else if (document.querySelector(`#${el}`)) { // check for valid dom element with ID targetID
            this.targetElement = document.querySelector(`#${el}`);
        } else {
            throw ('NJPicker requires a valid target element(targetEl) or target element ID(targetID)');
        }
    }
// check if the target element exist in the dom
check if the target element exist in the dom
check if the target element exist in the dom
checkTarget(el) {
        if (el instanceof HTMLElement) { 
            this.targetElement = el;
        } else if (document.querySelector(`#${el}`)) {  with ID targetID
            this.targetElement = document.querySelector(`#${el}`);
        } else {
            throw ('NJPicker requires a valid target element(targetEl) or target element ID(targetID)');
        }
    }
checkTarget ( el ) { if ( el instanceof HTMLElement ) { this . targetElement = el ; } else if ( document . querySelector ( ` ${ el } ` ) ) { this . targetElement = document . querySelector ( ` ${ el } ` ) ; } else { throw ( 'NJPicker requires a valid target element(targetEl) or target element ID(targetID)' ) ; } }
check if the target element exist in the dom
check if the target element exist in the dom
// check for valid dom element // check for valid dom element with ID targetID