![]() ![]() I came across scrollIntoView() and this does the trick … yours does also. THAT’S what I want to automatically scroll to. Unless we click on some other menu, our mouseup Handler will automatically select what our previous selection was before we clicked the scroll bar. to something off screen, we decide to click on the scroll bar. So I am thinking that when we TAB forward e.g. This causes automatic scrolling because we’ve selected a different main menu. So we’re TABbing and suddenly we’ve tabbed beyond the right edge of the #menubar because we’ve gone to the next #menubar > li, which was previously off screen. This automatically selects each li in turn. All based on tabindex which has already been added to $(“li”) with start up. TABbing from menu item to menu item, which may take us to a different menu, forward or backward.To go from a menu item in one menu to a menu item in another menu requires TABbing. You can mouse from one main menu to another as long as no drop menu is showing. Moving the mouse won’t scroll anything because you can’t move it to a menu that’s off screen … once you’ve dropped a menu. We are not talking using the mouse to go from menu to menu. I’m not sure if we are talking about different issues though as I am sideways scrolling with a mac mouse ? You will still need the code I gave you to stop the menu still showing while you scroll the menu bar sideways with the mouse. Of course you’d need to script that behaviour if you have many menu items as the side they drop down from will change depending on which way you are scrolling. In that way they will stay within the bounds of the menu (assuming you don’t have multiple nested items as in my example). That doesn’t sound like a usable UI unless I misunderstood what you meant.Ī better choice would be to make the right side drop menus drop down from the right of the menu item and go left. I’d hate that if you did it to me while I was trying to hover the menu item and then you moved it? Your mouse would then be in the wrong place to traverse that menu. aMenu when it goes beyond the right/left edges of #menubar, force the scrolling #menubar to scroll to the parent #menubar > li. I’m thinking that instead of hiding the dropdown. (As I said in the original thread the scroll event should most likely be debounced (throttled) to avoid it causing any lag on the page (but that would be a question for the js forum).) Hope you can implement something similar for your demo as I believe it is the only realistic solution. $MBScroller.on("mousedown", function(evt) dropmenu lose focus and pressing TAB later won't Otherwise, clicking on scrollbar to scroll makes the * PaulOB's creation at changed to jQuery */ Here’s the marvelous code for scrolling the horizontal menu ( ): $itsFocusedItem ![]() * drop + sub-menus (initially hidden) */ Scrolling a CSS-driven dropdown menu and overflow:hidden? The main #menubar > li will scroll and hide when scrolled to the left of #menubar’s border, but the dropdown menus. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |