I see one problem in some situations using the "#" as anchor tag. If the page have a large content and you click the link with "#", the position of scrollbar of the browser go to the top of page.
If you click a link with the "javascript:;" anchor, the scrollbar stays at the same position.' On 2/16/07, Tim Baxter <[EMAIL PROTECTED]> wrote:
Your first example. Inline javascript on a link is bad. Actually, even in the first example, the link should do SOMETHING when JS isn't available, if that's not possible, than you should insert the link with your JS. On 2/16/07, hcabbos <[EMAIL PROTECTED]> wrote: > What's the best way to apply a behavior to an anchor tag? > > <a href="#" class="someClass">my text</a> > > -- or -- > > <a href="javascript:;" class="someClass">my text</a> > > _______________________________________________ > jQuery mailing list > [email protected] > http://jquery.com/discuss/ > > _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
