JQuery ScrollTo Disabling nchors on animation?

If it's CSS, what properties are you setting that causes the hanging (I can't duplicate the hanging on my machine with a simple font-size change). As far as I can tell, you can't prevent a CSS :hover If it's JavaScript, can't you just unbind the event before calling scrollTo? A little more elaboration or an example would be useful Edit: Okay, in response to your comment, basically you have to unbind the mouseenter and mouseleave events before you use scrollTo : $(...).

Unbind('mouseenter mouseleave') Demo Visit http://demos.flesler.com/jquery/scrollTo/#target-examples and run the following code in Firebug You can then click on the "test scroll" link to test the code. You should see that the browser does not hang when the mouse hovers over the rest of the links When the scrolling stops you can click on any of the "go back" links and it will scroll back, except this time it will not unbind the hover events, so you the browser should hang Note: I did not experience any hanging at all. Are you using a slow computer or an older version of jquery perhaps?

Let me know if the demo works as expected Inject some CSS to add a background to the elements we are going to hover over and increase the font-size to make the hover area bigger. */ $('head'). Append(''); /* Setup the hover events -- change the backgroundPosition and fade the elements in and out.

*/ function hoverOn() { $(this) . Css('backgroundPosition','-95px -210px') . FadeTo('normal', 1); } function hoverOff(){ $(this) .

Css('backgroundPosition','-260px -110px') . FadeTo('normal', 0.5); } // Set the default opacity and bind the hover events $('. Back').

Not('#pane-target a:first') . Css('opacity', 0.5) . Hover(hoverOn, hoverOff); // Modify the first link so that we can use it to trigger the scroll.

$('#pane-target a'). Eq(0) . Css('backgroundImage', 'none') // Remove the backgroundImage for clarity .

Unbind('click') // unbind the old "go back" behaviour . Text('test scroll') . Click(function(){ // unbind the hover events so that they don't hang the browser $('.

Back'). Not('#pane-target a:first') . Unbind('mouseenter mouseleave'); $('#pane-target').

ScrollTo( 'li:eq(5)', 800, {onAfter:function(){ // re-bind the hover events $('. Back'). Not('#pane-target a:first').

Hover(hoverOn, hoverOff); }} ); return false; }).

If it's CSS, what properties are you setting that causes the hanging (I can't duplicate the hanging on my machine with a simple font-size change). As far as I can tell, you can't prevent a CSS :hover. If it's JavaScript, can't you just unbind the event before calling scrollTo?

A little more elaboration or an example would be useful. Edit: Okay, in response to your comment, basically you have to unbind the mouseenter and mouseleave events before you use scrollTo: $(...). Unbind('mouseenter mouseleave'); Demo Visit http://demos.flesler.com/jquery/scrollTo/#target-examples and run the following code in Firebug.

You can then click on the "test scroll" link to test the code. You should see that the browser does not hang when the mouse hovers over the rest of the links. When the scrolling stops you can click on any of the "go back" links and it will scroll back, except this time it will not unbind the hover events, so you the browser should hang.

Note: I did not experience any hanging at all. Are you using a slow computer or an older version of jquery perhaps? Let me know if the demo works as expected.

/* Inject some CSS to add a background to the elements we are going to hover over and increase the font-size to make the hover area bigger. */ $('head'). Append(''); /* Setup the hover events -- change the backgroundPosition and fade the elements in and out.

*/ function hoverOn() { $(this) . Css('backgroundPosition','-95px -210px') . FadeTo('normal', 1); } function hoverOff(){ $(this) .

Css('backgroundPosition','-260px -110px') . FadeTo('normal', 0.5); } // Set the default opacity and bind the hover events $('. Back').

Not('#pane-target a:first') . Css('opacity', 0.5) . Hover(hoverOn, hoverOff); // Modify the first link so that we can use it to trigger the scroll.

$('#pane-target a'). Eq(0) . Css('backgroundImage', 'none') // Remove the backgroundImage for clarity .

Unbind('click') // unbind the old "go back" behaviour . Text('test scroll') . Click(function(){ // unbind the hover events so that they don't hang the browser $('.

Back'). Not('#pane-target a:first') . Unbind('mouseenter mouseleave'); $('#pane-target').

ScrollTo( 'li:eq(5)', 800, {onAfter:function(){ // re-bind the hover events $('. Back'). Not('#pane-target a:first').

Hover(hoverOn, hoverOff); }} ); return false; }).

Ah, no it's a background-postion shift done with a jQuery . Hover . FadeTo ... I'm VERY new to javascript, how would I go about unbinding those other animations for the duration of the scroll animation?

– Brian May 1 '09 at 12:27 Thanks so much. This makes sense. I have noticed really glitchy behavior in my browser lately so I think it might be the animation that is hesitating after all and not the :hovers causing the problem, nonetheless, I have noted this for future use, and I think it is a help to the community!

– Brian May 1 '09 at 20:05.

Visit http://demos.flesler.com/jquery/scrollTo/#target-examples and run the following code in Firebug. You can then click on the "test scroll" link to test the code. You should see that the browser does not hang when the mouse hovers over the rest of the links.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions