Rick Strahl's Web Log. jQuery Text Change Event - ZURB Playground - ZURB.com. Enough theory, let's get down to implementation. Notice exhibit A to the right, looks like a standard textarea with a disabled save button. Witness the button enable when there is text in the field, and disable when there is not. Moderately impressive right? Try copying, pasting, or cutting text with the shortcut keys. Download and link up our textchange plugin. $('#exhibita').bind('hastext', function () { $('#exhibitaButton').removeClass('disabled').attr('disabled', false);}); $('#exhibita').bind('notext', function () { $('#exhibitaButton').addClass('disabled').attr('disabled', true);}); The plugin adds the hastext and notext events that you can bind input and textarea elements to.
The hastext event fires when the element goes from having no text to having text, and the notext event fires when the element goes from having text to being blank. HTML5 - Part 1 - How to make a website from scratch - YouTube - Aurora.
Udacity - Free Classes. Awesome Instructors. Inspiring Community.