Hello Klaus,

I found your post while surfing the web.
I too have problem with link anchors jumping to the top of a HTML
page.
Please visit: http://www.pictureframe.com.au/picture_frame_contact.html
Click " Send" and you will see what I mean.
I am happy to pay for a fix to this issue.
Alternatively, can you suggest helpful links?

Best Regards,

Paul Nonnis.

www.pictureframe.com.au



















On Aug 10, 9:50 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> UI tabs for example uses hrefs with fragment identifiers that point to
> the related parts of the document (like in TOCs for example). That way
> it'll degrade gracefully in case JS is turned off.
>
> <a id="tab_1" href="#content_1">Stop</a>
>
> To avoid the page jump you just need to make sure that the default
> link action is turned off:
>
> $('#tab_1').click(function() {
>     return false;
>
> });
>
> --Klaus
>
> On Aug 8, 2:47 pm, John K <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello, I was wondering what the most efficient ways of using anchor
> > links when they are just being used for simple jQuery tabbed browsing.
> > For example, say I have two tabs, and on the page load only the first
> > content box is shown, with the html like so:
>
> > <div id="tabs">
> >         <ul>
> >                 <li><a id="tab_1">Stop</a></li>
> >                 <li><a id="tab_2">Look</a></li>
> >         </ul>
>
> >         <div id="content_1">
> >                 <p>Lorem ipsum dolor</p>
> >         </div>
>
> >         <div id="content_2"> <!-- not shown on page load -->
> >                 <p>Lorem ipsum dolor</p>
> >         </div>
> > </div>
>
> > I use jQuery to show the relevant content div when either <a> link is
> > clicked. That bit is fine.
>
> > But as you'll notice, I have no 'href' link inside my <a> anchors.
> > Therefore I have to add 'cursor: pointer' to my css to get the hand
> > cursor to appear when you hover over the tab. This does throw up a
> > warning in my html validation but not an error. So I'd like to know
> > whether this is best practice for these kind of jQuery tabs.
>
> > If I use <a href="#">Stop</a> the page can jump to the top when I
> > click on the tab, which doesn't look good.
>
> > What would you use to make this as perfect as possible?- Hide quoted text -
>
> - Show quoted text -

Reply via email to