How to disable an anchor (link) tag (convert to span)

Viewed 13875

I have a bunch of anchor tags (<a>) that I need to convert to <span> tags. I don't need to do this to disable clicking (I know about preventDefault() and returning false from the click event handler). I just need to do this to enable drag and drop sorting (which IE forbids on an anchor tag but permits on a span).

I have a working solution that is fine.

http://jsfiddle.net/5HGbx/

I'm just wondering if any of you wizards have a slicker way of achieving the same end result.

3 Answers
Related