function removeExtraText(element, maxlength) {
        if (element.prop('tagName') === 'INPUT' || element.prop('tagName') === 'TEXTAREA') {
            fieldValue = element.val();
            element.val(fieldValue.substring(0, maxlength));
        }
        else {
            fieldValue = element.text();
            element.text(fieldValue.substring(0, maxlength));
        }
    }
/*
     * Removes text that goes over maximumlength creating the illusion of "preventing typing"
     * when maximum number of characters has been reached
     */
Removes text that goes over maximumlength creating the illusion of "preventing typing"
when maximum number of characters has been reached
Removes text that goes over maximumlength creating the illusion of " preventing typing " when maximum number of characters has been reached
function removeExtraText(element, maxlength) {
        if (element.prop('tagName') === 'INPUT' || element.prop('tagName') === 'TEXTAREA') {
            fieldValue = element.val();
            element.val(fieldValue.substring(0, maxlength));
        }
        else {
            fieldValue = element.text();
            element.text(fieldValue.substring(0, maxlength));
        }
    }
function removeExtraText ( element , maxlength ) { if ( element . prop ( 'tagName' ) === 'INPUT' || element . prop ( 'tagName' ) === 'TEXTAREA' ) { fieldValue = element . val ( ) ; element . val ( fieldValue . substring ( 0 , maxlength ) ) ; } else { fieldValue = element . text ( ) ; element . text ( fieldValue . substring ( 0 , maxlength ) ) ; } }
Removes text that goes over maximumlength creating the illusion of "preventing typing"
 when maximum number of characters has been reached
Removes text that goes over maximumlength creating the illusion of " preventing typing " when maximum number of characters has been reached