login/register

Snip!t from collection of Alan Dix

see all channels for Alan Dix

Snip
summary

How did Amazon get away without using a delay?
It’s easy to move the cursor from Amazon’s main drop ...
image
If the cursor moves into the blue triangle the currently ...
... switch the submenu, giving it a really responsive feel.

Breaking down Amazon’s mega dropdown - Ben Kamens
http://bjk5.com/post/44698559168/breaking-down-amazons-mega-dropdown

Categories

/Channels/techie/jQuery

[ go to category ]

/Channels/techie/web development

[ go to category ]

For Snip

loading snip actions ...

For Page

loading url actions ...

How did Amazon get away without using a delay?


It’s easy to move the cursor from Amazon’s main dropdown to its submenus. You won’t run into the bootstrap bug. They get away with this by detecting the direction of the cursor’s path.

image
If the cursor moves into the blue triangle the currently displayed submenu will stay open for just a bit longer.

At every position of the cursor you can picture a triangle between the current mouse position and the upper and lower right corners of the dropdown menu. If the next mouse position is within that triangle, the user is probably moving their cursor into the currently displayed submenu. Amazon uses this for a nice effect. As long as the cursor stays within that blue triangle the current submenu will stay open. It doesn’t matter if the cursor hovers over “Appstore for Android” momentarily — the user is probably heading toward “Learn more about Cloud Drive.”

And if the cursor goes outside of the blue triangle, they instantly switch the submenu, giving it a really responsive feel.

HTML

<h1>How did Amazon get away without using a delay?</h1><br><p>It&#x2019;s easy to move the cursor from Amazon&#x2019;s main dropdown to its submenus. You won&#x2019;t run into the bootstrap bug. They get away with this by detecting the direction of the cursor&#x2019;s path.</p> <p class="center"><img src="http://static.tumblr.com/9hgswys/vogmj8fh4/screen_shot_2013-03-06_at_1.17.35_am.png" alt="image"><br><em>If the cursor moves into the blue triangle the currently displayed submenu will stay open for just a bit longer.</em></p> <p>At every position of the cursor you can picture a triangle between the current mouse position and the upper and lower right corners of the dropdown menu. If the next mouse position is within that triangle, the user is probably moving their cursor into the currently displayed submenu. Amazon uses this for a nice effect. As long as the cursor stays within that blue triangle the current submenu will stay open. It doesn&#x2019;t matter if the cursor hovers over &#x201c;Appstore for Android&#x201d; momentarily &#x2014; the user is probably heading toward &#x201c;Learn more about Cloud Drive.&#x201d;</p> <p>And if the cursor goes outside of the blue triangle, they instantly switch the submenu, giving it a really responsive feel.</p>