Je voudrais que la tooltip s'affiche qd CP n'est pas egal a 5 , je n'arrive pas , voici mon code qui marche seulemnt si je laisse le '>' mais du coup la tooltip ne s'affiche pas qd c'est superieur a 5 :
Code : Tout sélectionner
check['CP'] = function() {
var CP = document.getElementById('CP'),
tooltipStyle = getTooltip(CP).style;
[color=#FF0000]if (CP.value.length >= 5) {[/color]
CP.className = 'correct';
tooltipStyle.display = 'none';
return true;
} else {
CP.className = 'incorrect';
tooltipStyle.display = 'inline-block';
return false;
}
};