Disable/enable an input with jQuery?


Which is the standard way? And, conversely, how do you enable a disabled input? jQuery 1.6+ To change the disabled property you should use the .prop() function.

jQuery 1.5 and below The .prop() function doesn’t exist, […]

.prop() vs .attr()

So jQuery 1.6 has the new function prop().

or in this case do they do the same thing? And if I do have to switch to using prop(), all the old attr() calls will break if i switch to […]

Is there an “exists” function for jQuery?

How can I check the existence of an element in jQuery? The current code that I have is this:

Is there a more elegant way to approach this? Perhaps a plugin or a function? Yes!

This is in […]

Add table row in jQuery

What is the best method in jQuery to add an additional row to a table as the last row? Is this acceptable?

Are there limitations to what you can add to a table like this (such as inputs, selects, […]

event.preventDefault() vs. return false

When I want to prevent other event handlers from executing after a certain event is fired, I can use one of two techniques. I’ll use jQuery in the examples, but this applies to plain-JS as well: 1. event.preventDefault()

2. […]