• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

[jQuery] Synchronization

 
Ranch Hand
Posts: 1061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
i have a dropdown menu here and i have the problem that sometimes it won't close if you move too fast over it.
Try it here with fast mouse moves from top to bottom over the menu.

On the web page i'm working on, the menu (and the main content) are within an iframe and my attempt to solve this problem was an "mouse catcher" div in the parent frame.
I bound a mouseover event to the "mouse catcher" div where i call closeSubNavi() in the frame.
I tried to simulate this state here.

It works fine in jsfiddle but not in real life.
There the call of closeSubNavi() from the parent frame continuously catches the just opening submenu in the state of the fadeIn() animation.
It closes it, but when i open the submenu again, it can be half-transparent or even completely invisible.
How to solve this?

Edit: the above is solved. Nevertheless the following still interests me

Is there something in jQuery like synchronized in Java?
Maybe something like a queque where you can add commands, wich are processed consecutively?
Something like


Thanks
Chris

 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, there is queueing and dequeing of functions. It is mostly used for the animation engine but can be used for just about anything. See the documentation for the .queue() and .dequeue() methods. (Or the end of Chapter 5 of jQuery in Action, 2nd Edition if you have access to a copy.)
 
Chris Baron
Ranch Hand
Posts: 1061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear,
so it's really named queue(). How embarrassing
Thanks for not using http://lmgtfy.com/

Bear Bibeault wrote:jQuery in Action, 2nd Edition if you have access to a copy.


Just acquired the 3rd ediition as eBook
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmmm, there is no 3rd edition...
 
Chris Baron
Ranch Hand
Posts: 1061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, then the comma doesn't make much sense there
jqurey-in-action.jpg
[Thumbnail for jqurey-in-action.jpg]
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah! That's the third printing of the second edition. It just means that they ran out of books from the first and second print runs and needed to print more. (When that happens, we have the opportunity to make minor changes that won't affect page flow).

Thanks for buying the book -- maybe it will get to a fourth printing!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic