0
Je n'arrive pas à me concentrer sur la mise à jour avec la valeur actuelle. Y a-t-il un bug dans ce code ou y at-il une approche plus propre qui me manque? Puis-je passer «ceci» ou «l'événement»?Chaînage des événements .live() vers les fonctions
Je reçois cette erreur:
'focused is not defined'
Je ce bloc de code:
$("input, select, textarea, button, .link, div, .button").live({
click:clearDefault,
focusin:function() {focused = ($(this).attr('title'))},
focusout:function() {focused = false},
mouseover:onHelp,
mouseout:helpFallback
});
Quelles cartes à ces fonctions:
function onHelp() {
if (!helpDiv) {
helpDiv = $('#helpText');
}
var $this = $(this);
var text = $this.attr('title');
if ($this.attr('titlehtml')) {
var text = $this.attr('titlehtml');
}
if ($this.hasClass('screenshot')) {
text += "<img src='images/icon_table_" + $this.attr('id') + ".png' >";
}
if ($this.attr('errorhtml')) {
text += "<div id='userError'>"+$this.attr('errorhtml')+"</div>";
}
helpDiv.show().html(text);
}
function helpFallback() {
if (focused) {
helpDiv.show().html(focused);
} else {
helpDiv.hide();
}
}
Où trouvez-vous réellement _define_ 'focused'? Je ne vois pas 'var focused = false;' n'importe où. –
Regardez le deuxième bloc de code .. ooo. vous voulez dire 'var focalisé = ''; Yep c'est ... – roberthuttinger
Hmmm ... Je ne vois pas 'var focus = '';' n'importe où. – user113716