File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disabling Anchor Tags Using jQuery

 
Kavisha Paranamana
Greenhorn
Posts: 25
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I'm developing a web application in these days. I use an <a> tag which is stylized with CSS as a button. I need to make it disabled once the user clicks on it, using jQuery. I tried setting up something like $('#id').attr("disabled", "disabled"); but that didn't work. Does anyone know how to use jquery to disable an anchor tag?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Kavisha Paranamana
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That works perfectly, Eric. Thanks a lot
 
Kapil Surendra Shinde
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric Pascarello wrote:


Hello Eric,

Could you please let me know how to disable the anchor tag on different button click.
i have use a bootstrap class in anchor tag to be used as button type icon(not actually button).
i have used .on and .off functions to do solve this issue but according to the senior he dosen't allow nd nt sure about running everywhere
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kapil Surendra Shinde wrote:
i have used .on and .off functions to do solve this issue but according to the senior he dosen't allow nd nt sure about running everywhere

What? What does he mean by that? Makes no sense to me.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic