[jQuery] Re: Feature/Plugin request - Animation queue
Gordon wrote: In reflection, I think what I need is a queue into which classes of animations can be inserted. All the animation events in a class get executed together, but each class in the queue is executed one after the other. Maybe something like this: animQueue.addClass ('hideClass'); animQueue.addAnim ('hideClass', $('.toHide').fadeOut ('slow')); [ ... ] animQueue.addClass ('showClass'); animQueue.addAnim ('showClass', $('.toShow').fadeIn ('slow')); animQueue.execute (); I understand what you mean, but the syntax is slightly wrong, I believe. You are not adding a function to your hypothetical animQueue; you are adding the results of processing that function. I think you need somthing more like: animQueue.addClass ('hideClass'); animQueue.addAnim ('hideClass', function() { $('.toHide').fadeOut ('slow') }); But once you see this, you can probably skip the whole animQueue.addClass bit also, since you can simply group your animations inside the new functions. My ideal format would be simpler, but I don't know if there is any way it could be made to work inside JQuery, since I still haven't really looked into the internal of animations: $.queue.add(function(){$("#myDiv").fadeIn();}) .add(function(){$("#myDiv").highlight();}); I think Brandon Aaron's implementation [1] was also mentioned on the thread. That one looks a little easier to understand. You might see if that one would work for you. Good luck, -- Scott [1] http://brandonaaron.net/jquery/plugins/fxqueue/
[jQuery] Re: Feature/Plugin request - Animation queue
I've been trying to pick apart the fzqueue plugin and the code Erik wrote, but unfortunately I can't figure out how it actually works. It seems that it's based around anarray that's being used as a FIFo structure, but how the code knows that one animation has ended is a total mystery to me. In reflection, I think what I need is a queue into which classes of animations can be inserted. All the animation events in a class get executed together, but each class in the queue is executed one after the other. Maybe something like this: animQueue.addClass ('hideClass'); animQueue.addAnim ('hideClass', $('.toHide').fadeOut ('slow')); animQueue.addClass ('moveClass'); $('.moveClass').each (function (){ animQueue.addAnim ('moveClass', $(this).animate ({ top: Math.floor (Math.random () * 1000), left: Math.floor (Math.random () * 1000) },'slow')); }); animQueue.addClass ('showClass'); animQueue.addAnim ('showClass', $('.toShow').fadeIn ('slow')); animQueue.execute (); Hopefully the syntax above will give you an idea of what I'm thinking. I just wish I knew how to implement something like that. :) On May 24, 11:47 am, Gordon <[EMAIL PROTECTED]> wrote: > I've already posted on this topic before, but I really am gettign > quite desperate as the project deadline looms and I still don't have a > solution. > > I need several animations to happen, but I need them to happen in > sequence rather than all at once (first animation: hide unselected > items. Second animation: Move visible items to new locations to > occupy space taken by unselected items/make space for currently hidden > selected items. Third animation: Reveal currently hidden selected > items). > > I tried using the callback method, but this has a serious drawback for > my purposes, in that if one of the animations in the chain doesn't > occur (because no items were unselected but some new ones were > selected, for example) then all subsequent animations don't occur > either. If a jQuery selector returns 0 results then applied effects > aren't executed. > > What I need is some code that will ececute my animations one after the > other, but which doesn't depend on all animations in the chain being > triggered for the subsequent animations to play. Is there a plugin > for doing this? Or is it slated as a new feature for jQuery? Or has > anyone else come up with a solution to the problem? > > Sorry to keep asking this but like I said, it's getting pretty urgent.
[jQuery] Re: Feature/Plugin request - Animation queue
Paul Bakaus wrote: Jörn, Interface in his current version has this 'stopping' feature you requested, until John releases the new written fx functions. Check it out! D'oh, should have thought of that. Thanks Paul! -- Jörn Zaefferer http://bassistance.de
[jQuery] Re: Feature/Plugin request - Animation queue
Okay, thanks to everyone who responded, I really appreciate the help. Unfortunately this is turning out to be a tougher problem to solve than I first thought. Basically, what needs to happen is 1) All elements that have not been selected and are visible need to fade out. 2) All elements that have been selected need to move to new positions (which will be computed by their order in the DOM and an x/y grid). 3) All elements that have been selected but which are invisible need to face in. The 3 animation steps need to occur in unison on all affected elements. Using Erik's technique it's fairly easy to get steps 1 and 3 to happen in sequence, but step 2 is proving the real tricky one, because each element is moving to a different position and therefore needs its own animate () call, but all these elements have to move in unison. Erik's technique will only allow them to move one at a time (as far as I can tell). Brandon's plugin seemed like the way to go but unfortunately it doesn't seem possible to get it to animate a group of elements as one but have each group selected animate in sequence. Mark's idea looked like the simplest one to pull off, but it seems to cause weird effects to happen for reasons I can't figure out. The same group of elements gets repeatedly faded in 10-12 times before the animation finally stops. On May 24, 11:47 am, Gordon <[EMAIL PROTECTED]> wrote: > I've already posted on this topic before, but I really am gettign > quite desperate as the project deadline looms and I still don't have a > solution. > > I need several animations to happen, but I need them to happen in > sequence rather than all at once (first animation: hide unselected > items. Second animation: Move visible items to new locations to > occupy space taken by unselected items/make space for currently hidden > selected items. Third animation: Reveal currently hidden selected > items). > > I tried using the callback method, but this has a serious drawback for > my purposes, in that if one of the animations in the chain doesn't > occur (because no items were unselected but some new ones were > selected, for example) then all subsequent animations don't occur > either. If a jQuery selector returns 0 results then applied effects > aren't executed. > > What I need is some code that will ececute my animations one after the > other, but which doesn't depend on all animations in the chain being > triggered for the subsequent animations to play. Is there a plugin > for doing this? Or is it slated as a new feature for jQuery? Or has > anyone else come up with a solution to the problem? > > Sorry to keep asking this but like I said, it's getting pretty urgent.
[jQuery] Re: Feature/Plugin request - Animation queue
Jörn, Interface in his current version has this 'stopping' feature you requested, until John releases the new written fx functions. Check it out! Paul On May 24, 10:51 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote: > Brandon Aaron wrote: > > > Actualy, the hoverIntent plugin is perfect for this. > >http://cherne.net/brian/resources/jquery.hoverIntent.html > > Not quite, it has the same queuing issue. But its still in interesting > plugin to build the tooltip upon. Thanks. > > -- > Jörn Zaefferer > > http://bassistance.de
[jQuery] Re: Feature/Plugin request - Animation queue
Brandon Aaron wrote: Actualy, the hoverIntent plugin is perfect for this. http://cherne.net/brian/resources/jquery.hoverIntent.html Not quite, it has the same queuing issue. But its still in interesting plugin to build the tooltip upon. Thanks. -- Jörn Zaefferer http://bassistance.de
[jQuery] Re: Feature/Plugin request - Animation queue
Actualy, the hoverIntent plugin is perfect for this. http://cherne.net/brian/resources/jquery.hoverIntent.html -- Brandon Aaron On 5/24/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote: Brandon Aaron wrote: > > Sure but I wonder what that would look like? Could you provide a more > detailed use-case? Sure. Basically it jus this: tooltipElements.hover( function() { tooltip.html( this.title ).fadeIn(); }, function() { tooltip.hide(); }); With that code, hovering over multiple tooltipped elements causes the fadeIn to be queued quite a lot of times, without stopping anytime soon. I'd need something like this: tooltipElements.hover( function() { tooltip.html( this.title ).fadeIn(); }, function() { tooltip.dequeue().hide(); }); While writing this I get the idea that this is a totally different issue... But maybe you can help with this, too :-) -- Jörn Zaefferer http://bassistance.de
[jQuery] Re: Feature/Plugin request - Animation queue
Brandon Aaron wrote: Sure but I wonder what that would look like? Could you provide a more detailed use-case? Sure. Basically it jus this: tooltipElements.hover( function() { tooltip.html( this.title ).fadeIn(); }, function() { tooltip.hide(); }); With that code, hovering over multiple tooltipped elements causes the fadeIn to be queued quite a lot of times, without stopping anytime soon. I'd need something like this: tooltipElements.hover( function() { tooltip.html( this.title ).fadeIn(); }, function() { tooltip.dequeue().hide(); }); While writing this I get the idea that this is a totally different issue... But maybe you can help with this, too :-) -- Jörn Zaefferer http://bassistance.de
[jQuery] Re: Feature/Plugin request - Animation queue
Sure but I wonder what that would look like? Could you provide a more detailed use-case? -- Brandon Aaron On 5/24/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote: Brandon Aaron wrote: > > Here is a pretty quick and dirty implementation of an fxqueue: > http://brandonaaron.net/jquery/plugins/fxqueue/ > > You can see the test page here: > http://brandonaaron.net/jquery/plugins/fxqueue/test/test.html > > And I just checked it into the plugins SVN. > http://jqueryjs.googlecode.com/svn/trunk/plugins/fxqueue/ > > Let me know if it works, doesn't work ... etc. :) I'd like to fadeIn tooltips, but need to stop/remove the animation on mouseout, because another fadeIn on the same elements could start. There isn't a stop/remove yet, could you add that? -- Jörn Zaefferer http://bassistance.de
[jQuery] Re: Feature/Plugin request - Animation queue
Brandon Aaron wrote: Here is a pretty quick and dirty implementation of an fxqueue: http://brandonaaron.net/jquery/plugins/fxqueue/ You can see the test page here: http://brandonaaron.net/jquery/plugins/fxqueue/test/test.html And I just checked it into the plugins SVN. http://jqueryjs.googlecode.com/svn/trunk/plugins/fxqueue/ Let me know if it works, doesn't work ... etc. :) I'd like to fadeIn tooltips, but need to stop/remove the animation on mouseout, because another fadeIn on the same elements could start. There isn't a stop/remove yet, could you add that? -- Jörn Zaefferer http://bassistance.de
[jQuery] Re: Feature/Plugin request - Animation queue
Ahh good catch! Thanks Aaron. Fixed. I used a semi-colon on the line above instead of a comma. :) -- Brandon Aaron On 5/24/07, Aaron Heimlich <[EMAIL PROTECTED]> wrote: Pretty cool stuff Brandon! Small typo though: jquery.fxqueue.js line 37: $this = $( args.shift() ); should be var $this = $( args.shift() ); On 5/24/07, Brandon Aaron <[EMAIL PROTECTED]> wrote: > > Glad it is working for you. :) > > I just updated it to fix the scope of the callback and you can now > pass params just like you can with animate. Check the new test page to > see. > > http://brandonaaron.net/jquery/plugins/fxqueue/test/test.html > > -- > Brandon Aaron > > On 5/24/07, Gordon <[EMAIL PROTECTED]> wrote: > > > > Brandon, you're a total lifesaver :) > > > > On May 24, 2:41 pm, "Brandon Aaron" <[EMAIL PROTECTED]> wrote: > > > I just updated the test to include an empty selector as well. > > > > > > -- > > > Brandon Aaron > > > > > > On 5/24/07, Brandon Aaron <[EMAIL PROTECTED]> wrote: > > > > > > > Here is a pretty quick and dirty implementation of an fxqueue: > > > >http://brandonaaron.net/jquery/plugins/fxqueue/ > > > > > > > You can see the test page here: > > > > http://brandonaaron.net/jquery/plugins/fxqueue/test/test.html > > > > > > > And I just checked it into the plugins SVN. > > > > http://jqueryjs.googlecode.com/svn/trunk/plugins/fxqueue/ > > > > > > > Let me know if it works, doesn't work ... etc. :) > > > > > > > -- > > > > Brandon Aaron > > > > > > > On 5/24/07, Gordon <[EMAIL PROTECTED]> wrote: > > > > > > > > I've already posted on this topic before, but I really am gettign > > > > > quite desperate as the project deadline looms and I still don't have a > > > > > solution. > > > > > > > > I need several animations to happen, but I need them to happen in > > > > > sequence rather than all at once (first animation: hide unselected > > > > > items. Second animation: Move visible items to new locations to > > > > > occupy space taken by unselected items/make space for currently hidden > > > > > selected items. Third animation: Reveal currently hidden selected > > > > > items). > > > > > > > > I tried using the callback method, but this has a serious drawback for > > > > > my purposes, in that if one of the animations in the chain doesn't > > > > > occur (because no items were unselected but some new ones were > > > > > selected, for example) then all subsequent animations don't occur > > > > > either. If a jQuery selector returns 0 results then applied effects > > > > > aren't executed. > > > > > > > > What I need is some code that will ececute my animations one after the > > > > > other, but which doesn't depend on all animations in the chain being > > > > > triggered for the subsequent animations to play. Is there a plugin > > > > > for doing this? Or is it slated as a new feature for jQuery? Or has > > > > > anyone else come up with a solution to the problem? > > > > > > > > Sorry to keep asking this but like I said, it's getting pretty urgent. > > > > > -- Aaron Heimlich Web Developer [EMAIL PROTECTED] http://aheimlich.freepgs.com
[jQuery] Re: Feature/Plugin request - Animation queue
Pretty cool stuff Brandon! Small typo though: jquery.fxqueue.js line 37: $this = $( args.shift() ); should be var $this = $( args.shift() ); On 5/24/07, Brandon Aaron <[EMAIL PROTECTED]> wrote: Glad it is working for you. :) I just updated it to fix the scope of the callback and you can now pass params just like you can with animate. Check the new test page to see. http://brandonaaron.net/jquery/plugins/fxqueue/test/test.html -- Brandon Aaron On 5/24/07, Gordon <[EMAIL PROTECTED]> wrote: > > Brandon, you're a total lifesaver :) > > On May 24, 2:41 pm, "Brandon Aaron" <[EMAIL PROTECTED]> wrote: > > I just updated the test to include an empty selector as well. > > > > -- > > Brandon Aaron > > > > On 5/24/07, Brandon Aaron <[EMAIL PROTECTED]> wrote: > > > > > Here is a pretty quick and dirty implementation of an fxqueue: > > >http://brandonaaron.net/jquery/plugins/fxqueue/ > > > > > You can see the test page here: > > >http://brandonaaron.net/jquery/plugins/fxqueue/test/test.html > > > > > And I just checked it into the plugins SVN. > > >http://jqueryjs.googlecode.com/svn/trunk/plugins/fxqueue/ > > > > > Let me know if it works, doesn't work ... etc. :) > > > > > -- > > > Brandon Aaron > > > > > On 5/24/07, Gordon <[EMAIL PROTECTED]> wrote: > > > > > > I've already posted on this topic before, but I really am gettign > > > > quite desperate as the project deadline looms and I still don't have a > > > > solution. > > > > > > I need several animations to happen, but I need them to happen in > > > > sequence rather than all at once (first animation: hide unselected > > > > items. Second animation: Move visible items to new locations to > > > > occupy space taken by unselected items/make space for currently hidden > > > > selected items. Third animation: Reveal currently hidden selected > > > > items). > > > > > > I tried using the callback method, but this has a serious drawback for > > > > my purposes, in that if one of the animations in the chain doesn't > > > > occur (because no items were unselected but some new ones were > > > > selected, for example) then all subsequent animations don't occur > > > > either. If a jQuery selector returns 0 results then applied effects > > > > aren't executed. > > > > > > What I need is some code that will ececute my animations one after the > > > > other, but which doesn't depend on all animations in the chain being > > > > triggered for the subsequent animations to play. Is there a plugin > > > > for doing this? Or is it slated as a new feature for jQuery? Or has > > > > anyone else come up with a solution to the problem? > > > > > > Sorry to keep asking this but like I said, it's getting pretty urgent. > > -- Aaron Heimlich Web Developer [EMAIL PROTECTED] http://aheimlich.freepgs.com
[jQuery] Re: Feature/Plugin request - Animation queue
On Thursday, May 24, 2007 7:01 AM Gordon <> said: > Thanks. I was pretty angry at that response, and yes, I might have > worded some of it better, but I really was just askign for help > looking for a plugin/solution to the problem, that's hardly askign > someone else to do my work for me. Seriously? You were actually *angry*? "that's hardly askign[sic] someone else to do my work for me." Actually, the way you started your email was to suggest that you're under a lot of pressure and THEREFORE the rest of the group should also be under pressure to help you get a solution. You stated that you'd already posted about it before and now your "project deadline looms and I still don't have a solution." Sorry we didn't come through for you the first time. Don't take what Erik said so personally. He wasn't attacking YOU. He was only suggesting you change your approach to how you presented your development issue to the list. And besides, more than half of his post was dedicated to helping you solve your issue. How can you justify being angry at that? I'm posting this on list because I think it should be said.
[jQuery] Re: Feature/Plugin request - Animation queue
Glad it is working for you. :) I just updated it to fix the scope of the callback and you can now pass params just like you can with animate. Check the new test page to see. http://brandonaaron.net/jquery/plugins/fxqueue/test/test.html -- Brandon Aaron On 5/24/07, Gordon <[EMAIL PROTECTED]> wrote: Brandon, you're a total lifesaver :) On May 24, 2:41 pm, "Brandon Aaron" <[EMAIL PROTECTED]> wrote: > I just updated the test to include an empty selector as well. > > -- > Brandon Aaron > > On 5/24/07, Brandon Aaron <[EMAIL PROTECTED]> wrote: > > > Here is a pretty quick and dirty implementation of an fxqueue: > >http://brandonaaron.net/jquery/plugins/fxqueue/ > > > You can see the test page here: > >http://brandonaaron.net/jquery/plugins/fxqueue/test/test.html > > > And I just checked it into the plugins SVN. > >http://jqueryjs.googlecode.com/svn/trunk/plugins/fxqueue/ > > > Let me know if it works, doesn't work ... etc. :) > > > -- > > Brandon Aaron > > > On 5/24/07, Gordon <[EMAIL PROTECTED]> wrote: > > > > I've already posted on this topic before, but I really am gettign > > > quite desperate as the project deadline looms and I still don't have a > > > solution. > > > > I need several animations to happen, but I need them to happen in > > > sequence rather than all at once (first animation: hide unselected > > > items. Second animation: Move visible items to new locations to > > > occupy space taken by unselected items/make space for currently hidden > > > selected items. Third animation: Reveal currently hidden selected > > > items). > > > > I tried using the callback method, but this has a serious drawback for > > > my purposes, in that if one of the animations in the chain doesn't > > > occur (because no items were unselected but some new ones were > > > selected, for example) then all subsequent animations don't occur > > > either. If a jQuery selector returns 0 results then applied effects > > > aren't executed. > > > > What I need is some code that will ececute my animations one after the > > > other, but which doesn't depend on all animations in the chain being > > > triggered for the subsequent animations to play. Is there a plugin > > > for doing this? Or is it slated as a new feature for jQuery? Or has > > > anyone else come up with a solution to the problem? > > > > Sorry to keep asking this but like I said, it's getting pretty urgent.
[jQuery] Re: Feature/Plugin request - Animation queue
I'm sorry you didn't like my response. I'm all for not antagonizing people and not being condescending and not inciting a flame war, and I didn't do any of those things. Given that I 1) didn't call him any names or put him down or anything like that, 2) explained how he could implement a solution to his problem, and 3) went so far as to actually implement 2 different solutions for him when nobody else had even replied yet, I don't think there's a whole lot of room to complain about my response. In the interest of not making things any worse, I won't respond to this thread anymore. Contact me off list if you'd like to complain at me more. --Erik On 5/24/07, Benjamin Sterling <[EMAIL PROTECTED]> wrote: @erik, I usually don't say stuff like this but I kinda feel your response warrants it. I don't see anything in Gordon message that required you to come at him like that. Yes, he may have worded a few things here and there a little better, but coming at him like he was demanding you do his work for him is not the way we should act in the jquery community. We have all been in a situation where we have been working on a piece of code for months on end with no resolve and we all know how frustrating that can be. Showing a little tact and asking him to post some of the code he already created would be better for the community. That benefits us in three ways, 1) new users will feel comfortable asking for help, especially if they are not well versed on how we communicate in our group, 2) gordon can see where he was going wrong in his code and 3) other people, like myself, may learn from his mistakes. Now this is just my two cents, just take it as constructive criticism. @gordon, Can you post some code on what you have already and/or maybe a url? That will be helpful in letting us help you. Mark posted a nice solution, IMO, that may work for you, have you tried something like that? -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com
[jQuery] Re: Feature/Plugin request - Animation queue
Brandon, you're a total lifesaver :) On May 24, 2:41 pm, "Brandon Aaron" <[EMAIL PROTECTED]> wrote: > I just updated the test to include an empty selector as well. > > -- > Brandon Aaron > > On 5/24/07, Brandon Aaron <[EMAIL PROTECTED]> wrote: > > > Here is a pretty quick and dirty implementation of an fxqueue: > >http://brandonaaron.net/jquery/plugins/fxqueue/ > > > You can see the test page here: > >http://brandonaaron.net/jquery/plugins/fxqueue/test/test.html > > > And I just checked it into the plugins SVN. > >http://jqueryjs.googlecode.com/svn/trunk/plugins/fxqueue/ > > > Let me know if it works, doesn't work ... etc. :) > > > -- > > Brandon Aaron > > > On 5/24/07, Gordon <[EMAIL PROTECTED]> wrote: > > > > I've already posted on this topic before, but I really am gettign > > > quite desperate as the project deadline looms and I still don't have a > > > solution. > > > > I need several animations to happen, but I need them to happen in > > > sequence rather than all at once (first animation: hide unselected > > > items. Second animation: Move visible items to new locations to > > > occupy space taken by unselected items/make space for currently hidden > > > selected items. Third animation: Reveal currently hidden selected > > > items). > > > > I tried using the callback method, but this has a serious drawback for > > > my purposes, in that if one of the animations in the chain doesn't > > > occur (because no items were unselected but some new ones were > > > selected, for example) then all subsequent animations don't occur > > > either. If a jQuery selector returns 0 results then applied effects > > > aren't executed. > > > > What I need is some code that will ececute my animations one after the > > > other, but which doesn't depend on all animations in the chain being > > > triggered for the subsequent animations to play. Is there a plugin > > > for doing this? Or is it slated as a new feature for jQuery? Or has > > > anyone else come up with a solution to the problem? > > > > Sorry to keep asking this but like I said, it's getting pretty urgent.
[jQuery] Re: Feature/Plugin request - Animation queue
Thanks to everyone who responded, it's really appreciated. I'm looking through the various solutions now. On May 24, 11:47 am, Gordon <[EMAIL PROTECTED]> wrote: > I've already posted on this topic before, but I really am gettign > quite desperate as the project deadline looms and I still don't have a > solution. > > I need several animations to happen, but I need them to happen in > sequence rather than all at once (first animation: hide unselected > items. Second animation: Move visible items to new locations to > occupy space taken by unselected items/make space for currently hidden > selected items. Third animation: Reveal currently hidden selected > items). > > I tried using the callback method, but this has a serious drawback for > my purposes, in that if one of the animations in the chain doesn't > occur (because no items were unselected but some new ones were > selected, for example) then all subsequent animations don't occur > either. If a jQuery selector returns 0 results then applied effects > aren't executed. > > What I need is some code that will ececute my animations one after the > other, but which doesn't depend on all animations in the chain being > triggered for the subsequent animations to play. Is there a plugin > for doing this? Or is it slated as a new feature for jQuery? Or has > anyone else come up with a solution to the problem? > > Sorry to keep asking this but like I said, it's getting pretty urgent.
[jQuery] Re: Feature/Plugin request - Animation queue
Thanks. I was pretty angry at that response, and yes, I might have worded some of it better, but I really was just askign for help looking for a plugin/solution to the problem, that's hardly askign someone else to do my work for me. As for code, I wish I could post it but it's already been made clear to me today that said code is my employer's property and I'm really not allowed to show any to third parties. On May 24, 2:09 pm, "Benjamin Sterling" <[EMAIL PROTECTED]> wrote: > @erik, > > I usually don't say stuff like this but I kinda feel your response warrants > it. I don't see anything in Gordon message that required you to come at him > like that. Yes, he may have worded a few things here and there a little > better, but coming at him like he was demanding you do his work for him is > not the way we should act in the jquery community. We have all been in a > situation where we have been working on a piece of code for months on end > with no resolve and we all know how frustrating that can be. Showing a > little tact and asking him to post some of the code he already created would > be better for the community. That benefits us in three ways, 1) new users > will feel comfortable asking for help, especially if they are not well > versed on how we communicate in our group, 2) gordon can see where he was > going wrong in his code and 3) other people, like myself, may learn from his > mistakes. > > Now this is just my two cents, just take it as constructive criticism. > > @gordon, > > Can you post some code on what you have already and/or maybe a url? That > will be helpful in letting us help you. > > Mark posted a nice solution, IMO, that may work for you, have you tried > something like that? > > -- > Benjamin Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.com
[jQuery] Re: Feature/Plugin request - Animation queue
Hi Erik, I know its easy to misinterpret emails at times. God knows that I've done it several times myself. In looking at Gordon's email, I really didn't see anything that would lead me to believe he was demanding our help. I think he's just in a pickle and is desperately seeking guidance from others that might be a bit more experienced than he currently is. I'm glad you helped him out with the examples. Its those types of actions that make the jQuery community one of the best. I'd also ask that you be patient with your fellow jQuery developers so that we continue to foster a great learning and sharing environment. I know others will be in a bind one day and I want to ensure that they always feel comfortable coming here to ask for help and/or code. Thanks, Rey Bango jQuery Project Team
[jQuery] Re: Feature/Plugin request - Animation queue
Brandon, that is a nice little plugin, nice job. On 5/24/07, Brandon Aaron <[EMAIL PROTECTED]> wrote: Here is a pretty quick and dirty implementation of an fxqueue: http://brandonaaron.net/jquery/plugins/fxqueue/ You can see the test page here: http://brandonaaron.net/jquery/plugins/fxqueue/test/test.html And I just checked it into the plugins SVN. http://jqueryjs.googlecode.com/svn/trunk/plugins/fxqueue/ Let me know if it works, doesn't work ... etc. :) -- Brandon Aaron On 5/24/07, Gordon <[EMAIL PROTECTED]> wrote: > > I've already posted on this topic before, but I really am gettign > quite desperate as the project deadline looms and I still don't have a > solution. > > I need several animations to happen, but I need them to happen in > sequence rather than all at once (first animation: hide unselected > items. Second animation: Move visible items to new locations to > occupy space taken by unselected items/make space for currently hidden > selected items. Third animation: Reveal currently hidden selected > items). > > I tried using the callback method, but this has a serious drawback for > my purposes, in that if one of the animations in the chain doesn't > occur (because no items were unselected but some new ones were > selected, for example) then all subsequent animations don't occur > either. If a jQuery selector returns 0 results then applied effects > aren't executed. > > What I need is some code that will ececute my animations one after the > other, but which doesn't depend on all animations in the chain being > triggered for the subsequent animations to play. Is there a plugin > for doing this? Or is it slated as a new feature for jQuery? Or has > anyone else come up with a solution to the problem? > > Sorry to keep asking this but like I said, it's getting pretty urgent. > > -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com
[jQuery] Re: Feature/Plugin request - Animation queue
I just updated the test to include an empty selector as well. -- Brandon Aaron On 5/24/07, Brandon Aaron <[EMAIL PROTECTED]> wrote: Here is a pretty quick and dirty implementation of an fxqueue: http://brandonaaron.net/jquery/plugins/fxqueue/ You can see the test page here: http://brandonaaron.net/jquery/plugins/fxqueue/test/test.html And I just checked it into the plugins SVN. http://jqueryjs.googlecode.com/svn/trunk/plugins/fxqueue/ Let me know if it works, doesn't work ... etc. :) -- Brandon Aaron On 5/24/07, Gordon <[EMAIL PROTECTED]> wrote: > > I've already posted on this topic before, but I really am gettign > quite desperate as the project deadline looms and I still don't have a > solution. > > I need several animations to happen, but I need them to happen in > sequence rather than all at once (first animation: hide unselected > items. Second animation: Move visible items to new locations to > occupy space taken by unselected items/make space for currently hidden > selected items. Third animation: Reveal currently hidden selected > items). > > I tried using the callback method, but this has a serious drawback for > my purposes, in that if one of the animations in the chain doesn't > occur (because no items were unselected but some new ones were > selected, for example) then all subsequent animations don't occur > either. If a jQuery selector returns 0 results then applied effects > aren't executed. > > What I need is some code that will ececute my animations one after the > other, but which doesn't depend on all animations in the chain being > triggered for the subsequent animations to play. Is there a plugin > for doing this? Or is it slated as a new feature for jQuery? Or has > anyone else come up with a solution to the problem? > > Sorry to keep asking this but like I said, it's getting pretty urgent. > >
[jQuery] Re: Feature/Plugin request - Animation queue
Here is a pretty quick and dirty implementation of an fxqueue: http://brandonaaron.net/jquery/plugins/fxqueue/ You can see the test page here: http://brandonaaron.net/jquery/plugins/fxqueue/test/test.html And I just checked it into the plugins SVN. http://jqueryjs.googlecode.com/svn/trunk/plugins/fxqueue/ Let me know if it works, doesn't work ... etc. :) -- Brandon Aaron On 5/24/07, Gordon <[EMAIL PROTECTED]> wrote: I've already posted on this topic before, but I really am gettign quite desperate as the project deadline looms and I still don't have a solution. I need several animations to happen, but I need them to happen in sequence rather than all at once (first animation: hide unselected items. Second animation: Move visible items to new locations to occupy space taken by unselected items/make space for currently hidden selected items. Third animation: Reveal currently hidden selected items). I tried using the callback method, but this has a serious drawback for my purposes, in that if one of the animations in the chain doesn't occur (because no items were unselected but some new ones were selected, for example) then all subsequent animations don't occur either. If a jQuery selector returns 0 results then applied effects aren't executed. What I need is some code that will ececute my animations one after the other, but which doesn't depend on all animations in the chain being triggered for the subsequent animations to play. Is there a plugin for doing this? Or is it slated as a new feature for jQuery? Or has anyone else come up with a solution to the problem? Sorry to keep asking this but like I said, it's getting pretty urgent.
[jQuery] Re: Feature/Plugin request - Animation queue
@erik, I usually don't say stuff like this but I kinda feel your response warrants it. I don't see anything in Gordon message that required you to come at him like that. Yes, he may have worded a few things here and there a little better, but coming at him like he was demanding you do his work for him is not the way we should act in the jquery community. We have all been in a situation where we have been working on a piece of code for months on end with no resolve and we all know how frustrating that can be. Showing a little tact and asking him to post some of the code he already created would be better for the community. That benefits us in three ways, 1) new users will feel comfortable asking for help, especially if they are not well versed on how we communicate in our group, 2) gordon can see where he was going wrong in his code and 3) other people, like myself, may learn from his mistakes. Now this is just my two cents, just take it as constructive criticism. @gordon, Can you post some code on what you have already and/or maybe a url? That will be helpful in letting us help you. Mark posted a nice solution, IMO, that may work for you, have you tried something like that? -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com
[jQuery] Re: Feature/Plugin request - Animation queue
I could have sworn I've seen a plugin that would do that. Anyway, couldn't you do something like this: var a1 = $('.class1'); if (a1.length > 0) { a1.animate({...}, run_second_animation); } else { run_second_animation(); } function run_second_animation() { // use the same construct for the second and third animations } I haven't tested that but it seems like it would work for you scenario, especially given that you have a limited number of animations in the chain. Of course you could probably generalize it real nicely too if you wanted. If that doesn't work for you, you could check out: http://berniecode.com/writing/animator.html On May 24, 6:47 am, Gordon <[EMAIL PROTECTED]> wrote: > I've already posted on this topic before, but I really am gettign > quite desperate as the project deadline looms and I still don't have a > solution. > > I need several animations to happen, but I need them to happen in > sequence rather than all at once (first animation: hide unselected > items. Second animation: Move visible items to new locations to > occupy space taken by unselected items/make space for currently hidden > selected items. Third animation: Reveal currently hidden selected > items). > > I tried using the callback method, but this has a serious drawback for > my purposes, in that if one of the animations in the chain doesn't > occur (because no items were unselected but some new ones were > selected, for example) then all subsequent animations don't occur > either. If a jQuery selector returns 0 results then applied effects > aren't executed. > > What I need is some code that will ececute my animations one after the > other, but which doesn't depend on all animations in the chain being > triggered for the subsequent animations to play. Is there a plugin > for doing this? Or is it slated as a new feature for jQuery? Or has > anyone else come up with a solution to the problem? > > Sorry to keep asking this but like I said, it's getting pretty urgent.
[jQuery] Re: Feature/Plugin request - Animation queue
On 5/24/07, Gordon <[EMAIL PROTECTED]> wrote: I've already posted on this topic before, but I really am gettign quite desperate as the project deadline looms and I still don't have a solution. ... Sorry to keep asking this but like I said, it's getting pretty urgent. When it comes to open source software, you get what you pay for. Saying you urgently need for someone else to fix your problem when you aren't paying them is a good way to get ignored, and irritate people in the process. The nice thing about open source, is if you need to make changes to something, you have the source, so you can change it yourself. And if nothing else, you can use a different library that supports what you want. In this case, you don't even really need effect queueing, you just need to write smarter callbacks. Instead of having your callbacks just blindly fire off more effects, have them check and see if any elements match the selector you're about to affect, and if nothing matches, call the next callback instead of starting another animation. Here's an example: http://erikandcolleen.com/erik/projects/jquery/fauxqueue/fauxqueue.html In fact, it really wouldn't be too hard to write a little function that could take care of that check for you. Here's a quick little stab at it: http://erikandcolleen.com/erik/projects/jquery/fauxqueue/queue.html Now go donate $100 to jQuery for helping you meet your deadline. --Erik