I am having a similar issue, but it's not the page that jumps, but the
dialog box itself.  I have a link at the bottom of the dialog.  The
content of the dialog is large enough that scrolling is required.
Every time the dialog box opens, the box scrolls down to the bottom
and selects the link.  I added a dummy link at the top, but (in
Firefox) you can see that there is an empty link selected.  Anyway to
open the dialog box and not have the link selected?


On Oct 14, 2:37 pm, Gremlyn1 <greml...@gmail.com> wrote:
> Ah yes, that was missing. Works as expected now, thanks :) (and much
> less hacky-feeling).
>
> On Oct 14, 1:36 pm, "Richard D. Worth" <rdwo...@gmail.com> wrote:
>
> > Make sure your click handler has a return false at the end like so
>
> > <a href="#sectionname" class="opens-a-dialog">click me to open a
> > dialog</div>
> > <div id="dialog"></div>
> > <script>
> > $('#dialog').dialog({ autoOpen: false });
> > $('a.opens-a-dialog').click(function() {  $('#dialog').dialog('open');
> >   return false;});
>
> > </script>
>
> > to prevent the browser from navigating to #sectionname.
>
> > - Richard
>
> > On Wed, Oct 14, 2009 at 4:11 PM, Gremlyn1 <greml...@gmail.com> wrote:
>
> > > So I have a set of links at the bottom of a page, and these links open
> > > up their respective dialog boxes, which is al working fine. Except
> > > when I click the link, the page jumps back to the top and you have to
> > > scroll back down to the links to click another and then it all happens
> > > again. The dialog also stays down the bottom, centered like it should
> > > be in the original view before the page jumped
>
> > > To work around this for now I put in an HTML anchor in the header tag
> > > of the section where the links are and it stays put now. What I am
> > > wondering is if there is a better way to do with all through jQuery
> > > UI. The anchor tags has the feeling of being a hack, but if that's
> > > what I am stuck with right now, then no worries.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to jquery-ui@googlegroups.com
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to