Hello,
I have a Button and a textarea on my page, and I would like to enable the button if the cursor is in the textbox(so you can write in it), and if you leave the textbox the button shall disable it self.
if ($("#lastname").is(':focus')) {
$('#btnaddpoll').prop('disabled', false);
} else {
$('#btnaddpoll').prop('disabled', true);
}
This statement just check when the page loads if its in focus or not. But can someone help me make it work so it will enable/disable it self based on either if the cursor is in or out of the textbox
Go to the complete details ...