Guide Text Not working when text is entered using another control

Posted by user2614405 on Stack Overflow See other posts from Stack Overflow or by user2614405
Published on 2013-10-21T09:31:38Z Indexed on 2013/10/21 9:54 UTC
Read the original article Hit count: 168

Filed under:
|
|

I have a textbox used to enter the text by user, which guide-text which disappears when user starts to write. But when I use a dropdown & select a text from it, & this text is automatically entered in the textbox, the guide-text is not fading away.

Events I am using to fade the guide-text :

$('input, textarea').live('keydown', toggleLabel);
$('input, textarea').live('paste', toggleLabel);

On change of dropdown :

$('.ui-discussion-text').change(function () {
    var oldText = $('.ui-discussion-input textarea').val();
    $('.ui-discussion-input textarea').val(oldText + " " + $(this).val());
});

Please help.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery