On Dec 31 2009, 5:10 pm, Šime Vidas <sime.vi...@gmail.com> wrote:
> Scott, you used A elements as JS triggers which is not proper... the A
> element is for linking to other web-resources. If you need an element
> for onclick JS execution, just use a button or a SPAN element....

Well, I was modifying existing code, which had <A> elements.  There's
only so many changes you can make at a time.

But still, I don't think I agree with you about the unsuitability of
using them so.  First of all, they do link to additional resources,
albeit ones that are on the same page (and of course we use them that
way to in non-JS markup.)  And secondly, while I believe in keeping
initial markup quite clean, I don't feel any compunction about using
whatever generated DOM elements make my job easier.  Sure I could use
a <SPAN> to do the same job, but then I'd need to style it like a
default link, add hover behavior to it for the mouse pointer.  I don't
see the advantage.

Is there any compelling reason you can explain to avoid them here?

  -- Scott

Reply via email to