Skip to content

December 30, 2009

Add a CSS class to any disabled button

This adds the class of “myclass” to any input with a type of “button” that is marked as disabled. This way you can easily style disabled buttons across a multitude of browsers.

$('input[type=button][disabled=disabled]').each(function(){
	$(this).addClass('myclass');
});
Read more from jQuery

Share your thoughts, post a comment.

(required)
(required)

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments

blog comments powered by Disqus