how to disable a span using jquery/javascript. The script
$('#spanid').attr("disabled", 'disabled');
works fine on IE but doesnt work on firefox.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You cannot
disablea<span>. Thedisabledattribute only works for input elemens. What are you trying to achieve there ?The only thing I can imagine is that you’ve got some event bindings on that
<span>, to remove those you can call jQuerys.unbind(),.die()and/or.undelegate().That would remove any event handler (bound directly or via delegation). The only problem here is, that you would to manually store the event handler functions if you want to “enable” it later on again.