animate

problem with position jquery slider

Hello, My question is, how I can gain better control over this slider, because if I move over it a couple of times then the slider slide's into a wrong position. Either below minimum value or above maximum value. I use the animate function. The slider has three different positions and it has to do basicly two things. 1.calculate how...

How to scroll div continuously on mousedown event?

Hi, I have two divs and two buttons: <div id="container"> <div id="items"></div> </div> <div id="up"></div> <div id="down"></div> How to continuously scroll '#items' until user releases the button? I tried using jquery mousedown event and animate function but couldn't make it to work. $("#up").mousedown(function(){ $("#items").an...

Why isn't the callback I pass to jQuery's animate() method called?

Hello, I can't call callback after animation ends. Here is my animation function: function animate( parentElement, callback ) { parentElement.animate({ "height" : "hide", "opacity" : 0.0 }, { duration : "slow"}, "linear", callback); } And here is calling it: animate( $(this).parent(), function() { alert('...

Optimize jQuery hover code to perform better (smoother animation)

Lately I've been spending some time reading about jQuery optimization tips which has certainly helped increase the performance of my scripts. However, I've got this featured news section on my site, which on mouse hover slides more information into place, and this section doesn't perform very well in any browser except Safari (and proba...

jQuery: Animating opacity in IE

Using a div with solid black color to fade out an image underneath it. In Chrome and Firefox, this works fine, however, in IE, it's backwards. $("div#bgcover").animate( {opacity:.70}, 2500); This starts at 0% opacity and is supposed to animate to 70% over time. In IE, however, it jumps from 0% to 100%, and then fades back down to 70%....

Jquery animation: Making PNG Transparency fixed DIV animate opacity?

Page in question: http://www.chrishanel.com/CMS The following works in IE7, but doesn't in IE8: HTML: <div id="shell"> <div id="quote"> <!--[if IE]> <div id="quoteie8" style="align:center;position:relative;opacity:1.00;text-align:center;height:144px;width:337px;margin:auto;filter:progid:DXImageTransform.Microsof...

jQuery animate() deselects text in Firefox

Here's the code: $("#textyt:input").focus(function() { $(this).animate({width:"545px"},500).css("color","#614A3E"); $(this).select(); $(this).mouseup(function(e){ e.preventDefault(); }); }); If I take away the animate effect, this focus event selects the text (as I'd like). With the animate effect, the text deselects when the an...

Animated numbers (semi-countdown) with JQuery?

I am trying to make a numerical value, say 5000, quickly change to another value, say 4000, using JQuery. Right now I do this fine using: mod(".class",4000,"add"); function mod(id,value,type){ var numb = $(id).html(); var current_value = parseInt(numb); do { if(type == "add") increment(id); else...

jQuery Animate GIF

I've got an animation that doesn't look so good in GIF format (transparency makes it look jagged). So I put three layers together with jQuery and I've got it looking pretty good... But, I now have another problem. I want to plot each of these animated images onto a map at different times. Plotting the points is easy. But plotting the po...

less verbose way to chain jquery events that have to wait for animations?

Chaining is great in jQuery, but it chains the trigger of each event and doesn't wait for the previous event to finish. This is noticeable primarily when animating. As such, the workaround I've seen is to use call back functions. The only drawback is if, say, you have 4 things that you want to animate in succession. Admittedly, this is...

jQuery grabing the color of an element PRE :hover

I'm trying to create a generic 'flash of color confirmation' function where it'll flash the background of an object to green and then fade out to whatever it's existing color was. So I may have two elements that I call this on click(): li background-color: red li background-color: black If I click the first one, it'd fade from green ...

jQuery:animate conundrum

I am having jQuery animation issues... I have a footer with a hidden div on top of it. When someone clicks a button near the header, the div should animate UP. Sort of like sliding up, like you're pulling a manila folder out of a drawer. (Not the normal slide up where the bottom of the div slides up to the top.) I found this piece of ...

How do you fadeIn and animate at the same time?

Using jQuery I'm creating a basic 'tooltip' animation so that the tooltip will appear in a little animation in which it fades into view as well as move vertically. So far I have this: $('.tooltip').fadeIn('slow'); $('.tooltip').animate({ top: "-10px" }, 'slow'); Doing it that way or this way: $('.tooltip').fadeIn('slow').animate({ t...

Call Scroll only when user scrolls, not when animate()

I have a few links across the page with the purpose of "going to the top", accomplished by scrolling the page to the top with a nice animation. I've noticed that sometimes while the page is scrolling the user will want to scroll back down, for example, but this is not possible. The screen will only stutter but will continue animating unt...

JQuery background color animate not working

I want to change the background color of 'exampleDiv' from the original white background to when I call the code below to immediate change the background yellow and then fade back to the original white background. $("#exampleDiv").animate({ backgroundColor: "yellow" }, "fast"); However, this code does not work. I have only the JQuery...

jQuery closest();

Hi There! I'm trying to animate an image which is partly hidden (via overflow: hidden) inside a list item. I want this to happen when a user hovers over an A tag inside the same list item. I have the following markup: <div id="projects" class="section"> <ul> <li> <img src="assets/img/projects/pf6.jpg" width="980" height="5...

Direct 2D gnuplot PNG animation?

Can anyone please confirm that yes/no Gnuplot 4.5 (on CVS) can output 2D animated PNG files? I have numerous datasets but one line that I'd like to show iteratively in 3 different places in my graph. Can this be done directly from gnuplot or is this something that would need to be animated externally from multiple frames? ...

Jquery problem: trying to stop an animation after first click.

Jquery newbie here =) so I've got a code that slides the menu divs to the right, the problem is that I don't want the menu to keep doing the animation after the first click on any of those divs. I've tried return false but it didn't help. Here's the code: $(document).ready(function(){ $("#menu_home").click(function(){ $("#menu_ho...

Jquery animate order question

So I've got a logo that changes its background on mousehover, I'm trying to have 5 diferent backgrounds, each one displayed on a mousehover, not randomized and back to the first background when the 5th mousehover is done. How can i achieve this? Here's the jquery script $(document).ready(function(){ $("#logo").hover( function() { ...

Showing an invisible div after jquery animate

So I'm trying to figure out how to show an invisible div after an animation on jquery. Here's the code to show the div: $('#box_green') .css({ visibility: "visible", opacity: 0 }) .fadeIn('slow') ; the css which also makes the div invisible: div#box_green{ background-image:url(../images/bg_stripe_green...