Search Results

Search found 1022 results on 41 pages for 'animate'.

Page 1/41 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • jQuery animate() - multiple selectors and variables, a unique animate() call

    - by ozke
    Hi guys, I am resizing several divs in a loop with animate() in jQuery. At the same time I am moving (left property, no resizing at all) the div where they are contained. Problem is, despite they have same duration the resize animate calls finish before the move call. They are out of sync. Is there any way of creating a list of selectors and its properties and then run a unique animate() call? Or, is there any alternative to make multiple animations happen at the same time? I've seen there's a property called step that happens every time animate loop happens but, again, each animate() call has it's own step call. Thanks in advance :)

    Read the article

  • jQuery animate mouseover/mouseout keep drop menu visible

    - by Ce.
    I'm trying to make a basic drop down menu with animate and am running into the issue where I can't seem to figure out how to keep the dropdown part open until the mouse leaves. Is there an easy way to tell this to stay open? I know what I have is completely wrong regarding the .clickme mouseout function since it will unload the menu accordingly. If anyone can help in this specific instance, I would be super grateful. PREVIEW HERE http://cu3ed.com/ddmenu/ or below: $(document).ready(function() { $('.clickme').mouseover(function() { $('#slidebox').animate({ top: '+=160' }, 200, 'easeOutQuad'); }); $('.clickme').mouseout(function(){ $('#slidebox').animate({ top: '-=160' }, 200, 'easeOutQuad') }); }); I would like to keep this as simple and clean as possible. I know the CSS is all crazy but it's totally preliminary. THANKS!!!

    Read the article

  • JQUERY animate Delay?

    - by AnApprentice
    I'm using JQUERY animate to show a banner at the top of the page, which is a DIV that is set to top -60 to hide it. I'm using the following JS call to show the div: // Animation $('#message-dock').animate({ top: 0 }, 500, function() { // Animation complete. }); What I can't figure out is for some reason there is an unwanted delay before I start seeing the div and I can't figure out why? Any Ideas?

    Read the article

  • How to properly use the .animate() function -- top

    - by sadmicrowave
    Is this the proper way to use the .animate(top) function? Positive number (animate down)-- $("div#container div#history-menu").animate({top:'180px'}, 600); Negative number (animate up)-- $("div#container div#history-menu").animate({top:'-180px'}, 600); Because I'm getting a java error in my error console that says: "error in parsing value for property 'top'. Declaration Dropped."

    Read the article

  • Jquery .Animate Width Problem.

    - by smoop
    Thanks in advance for any-help with this, I'll try and explain it well. I have a container of 1000px width and 220px height, in this I will have three columns 220px in height but with different widths (77px, 200px and 300px). When you click one div it will open to a fixed size (the same for each, say 400px) and the others which are not clicked will shrink back to their original sizes (77px, 200px and 300px). Like an accordian with different widths.. My jquery is getting there but not quite, I know how to create an Event on click, I know from there I need to shrink everything but the one I clicked back to their orignal size. I finish but making the one clicked expand to the size it needs to be. jsfiddle here! $(document).ready(function(){ // Your code here $('.section').click(function() { $('.section').not(this).animate({width:"77px"},400); //alert('clicked!'); $(this).animate({width:"400px"},400); }); }); <div id="pictureNavContainer"> <div class="section pictureSectionOne" id="1"></div> <div class="section pictureSectionTwo" id="2"></div> <div class="section pictureSectionThree" id="3"></div> </div> <style> #pictureNavContainer{background-color:#262626; width:1000px; height:220px; overflow:hidden;} .pictureSectionOne{float:left; background:yellow; height:220px; width:77px;} .pictureSectionTwo{float:left; background:red; height:220px; width:177px;} .pictureSectionThree{float:left; background:blue; height:220px; width:400px;} </style> I figured a kind of solution: <script> $(document).ready(function(){ // Your code here $('.section').click(function() { $('#1').animate({width:"50px"},400); $('#2').animate({width:"100px"},400); $('#3').animate({width:"200px"},400); //alert('clicked!'); $(this).animate({width:"400px"},400); }); }); </script> But the code isnt very good.. but it works This: $(function(){ var $sections = $('.section'); var orgWidth = []; var animate = function() { var $this = $(this); $sections.not($this).each(function(){ var $section = $(this), org = orgWidth[$section.index()]; $section.animate({ width: org }, 400); }); $this.animate({ width: 400 }, 400); }; $sections.each(function(){ var $this = $(this); orgWidth.push($this.width()); $this.click(animate); }); });

    Read the article

  • jQuery .animate() not animating backgroundPosition in IE

    - by mikemike
    I'm trying to animate a background image to move down a set amount of pixels but remain in the center of the page. Upon another click of an element I need it to move back to the top, but still remain in the center. Below is the current code: $(document).ready(function() { $('#email_campaigns').click(function(){ var width = $(window).width(); width = (width / 2) - 700; if($('#email_campaigns_box').css('display') == 'none'){ //$('body').css('background-position','center 119px'); $('body').animate({ backgroundPosition: (width + "px 119px") }, {duration:500}); } else { //$('body').css('background-position','center top'); $('body').animate({ backgroundPosition: (width + "px 0px") }, {duration:500}); } $('#email_campaigns_box').slideToggle("slow"); $('#client_login_box').slideUp("slow"); }); $('#client_login').click(function(){ var width = $(window).width(); width = (width / 2) - 700; alert(width); if($('#client_login_box').css('display') == 'none'){ //$('body').css('background-position','center 119px'); $('body').animate({ backgroundPosition: (width + "px 119px") }, {duration:500}); } else { //$('body').css('background-position','center top'); $('body').animate({ backgroundPosition: (width + "px 0px") }, {duration:500}); } $('#client_login_box').slideToggle("slow"); $('#email_campaigns_box').slideUp("slow"); }); }); I cannot pass 'center', as it will onyl accept numeric values. My goal is to calulate the center of the page in pixels (width = (width / 2) - 700;), and then animate to this rough position (it's normally out by a few pixels due to scrollbars, and then force to the center using a .css() call. The problem is that IE does not want to play ball. IE will not animate at all. Firefox/Safari/Chrome all work as expected. Below is a live example: http://recklessnewmedia.com/new/# (click 'email campaigns' at the top). Thanks

    Read the article

  • if the hide() jquery animate function set after animate(),it doesn't work?

    - by hh54188
    First I have a animate a iframe which id is "test" <iframe id="test" src=""></iframe> then I want animate it and hide it ,make a close effect like in MacOS: $('#test').animate({ 'width':0, 'height':0, 'top':$('input').offset().top, 'left':$('input').offset().left },function(){ //$(this).hide(); }).hide(); but it seems the iframe can not be hide.However,if I write it in the callback function that in animate,which is the annotated code above.It could work again. Here is online case So I wonder why the hide() after animate() doesn't work?Do I miss something ?

    Read the article

  • jQuery animate callback - doesn't complete, no callback?

    - by Mark
    This jsbin demonstrates my problem: http://jsbin.com/aqute4/edit I'm using jQuery animate to kick down some non-css properties ala: http://james.padolsey.com/javascript/fun-with-jquerys-animate/ However, the animate gets very close to the final number, but never actually reaches it! The callback doesn't happen. I need the callback to run. Thanks in advance!

    Read the article

  • jquery animate browser window

    - by duckofrubber
    Hi, Is there a way to animate a browser window using jquery. Right now I'm essentially using this: $(window).animate({ left: '+=50' }, 5000}); The reason why it isn't working is probably obvious, although not for me. I eventually need to loop an animate effect so that the browser will move back and forth dynamically. Thanks.

    Read the article

  • jQuery using .animate() fails to do ANYTHING in IE8

    - by Cypher
    So, it's official: I hate Internet Explorer. Yes, all bloody versions of it. :-D So, I didn't think I was doing anything complicated here, but apparently I am. I have a bunch of list items in an unordered list styled for a navigation menu, and in Firefox, Chrome, Safari, and Opera, things work fine. What is supposed to happen is when you hover a navigational item, it should animate some growth and animate a background color change. Nothing happens in Internet Explorer 7/8. I think it's just tied to the animate function, since if I swap .animate with .css, it works. http://project-cypher.net/wtf/ Ideas?

    Read the article

  • animate() not working for opacity in IE

    - by Karthik
    I'm trying to animate a div from 100% opacity to 40% opacity WITHOUT using fadeTo(). I need to use animate(). It works fine in chrome/FF/safari, but in IE, the opacity doesn't animate, it simply changes to that after the animation is done. Happens in IE 7 and 8. I'm doing this: .animate({ width: new_width, top: new_top, left: new_left, padding: new_padding, opacity: 0.4, filter: "alpha(opacity=40)" }, ... it's just not animating the opacity. Any ideas?

    Read the article

  • Animate function jQuery

    - by Antonio Pitasi
    I'm new here and I have a problem the jQuery's function "animate" function myFunction(newpage) { $('#loader').animate({opacity: 0.0}, 400, 'linear', function(){ // callback of fadeOut() $(this).load(newpage + ".php #toload", function(){ // callback of load() $('#loader').animate({opacity: 100.0}, 400, 'linear', function(){ //callback of fadeIn() // (not relevant for my problem, I think) $.getScript("js/test.js"); }); }); }); } My problem is: the first "animate" works like a charm but the second load the new content correctly, without the animation (a simple fadeIn). Anyone can help me? Thanks in advice! P.S. Sorry for my english

    Read the article

  • jQuery fadeOut, replaceWith, animate almost working

    - by Jesse
    I am trying to accomplish the following: 1. On click, have a div with id="fader" fadeout 2. replaceHtml of fader with new html (this new HTML will appear below the fold of the browser) 3. Animate new HTML to slide up to the specified location Step 1 and 2 are working, step 3 is not and I'm stumped as to why. Here's the javascript: $("#fader").fadeOut(1000, function() { $(this).replaceWith('<div id=\"fader\" style=\"margin-top:-500px;width:500px;height:400px;border:1px solid black;\">new div</div>', function() { $("#fader").animate({marginTop: "500px"}); }); }); Any thoughts on why the div won't animate would be greatly appreciated, thanks in advance!

    Read the article

  • Passing dynamic CSS to jQuery.animate

    - by harpo
    The documentation of jQuery.animate states that The only required parameter is a map of CSS properties. This map is similar to the one that can be sent to the .css() method, except that the range of properties is more restrictive. So, why does this work $('#con div').css( { top : function(i) { console.log(i); return (i * 500) + 'px'; } } ); and this doesn't? $('#con div').animate( { top : function(i) { console.log(i); return (i * 500) + 'px'; } } ); The console shows that the function is being evaluated for css, but not for animate. Am I missing something? By the way, I'm using 1.4.2.

    Read the article

  • JQuery: animate() doesn't work as expected in IE...

    - by swalkner
    Hi, I'm getting crazy with this IE 7... == hhttp://neu.emergent-innovation.com/ Why does following function not work in IE 7, but perfectly with Firefox? Is there a bug in the animate-function? function accordion_starting_page(){ // hide all elements except the first one $('#FCE-Inhalt02-ContentWrapper .FCE-Fade:not(:first)').css("height", "0").hide(); $('#FCE-Inhalt02-ContentWrapper .FCE-Fade:first').addClass("isVisible"); $('div.FCE-Title').click(function(){ // if user clicks on an already opened element => do nothing if (parseFloat($(this).next('.FCE-Fade').css("height")) > 0) { return false; } var toHide = $(this).siblings('.FCE-Fade.isVisible'); toHide.removeClass("isVisible"); // close all opened siblings toHide.animate({"height": "0", "display": "none"}, 1000); $(this).next('.FCE-Fade').addClass("isVisible").animate({"height" : "200"}, 1000); return false; }); } Thank you very much for your help...

    Read the article

  • [jQuery] Animate hidden hyperlink to display:block

    - by cube
    Hi guys, given a hidden hyperlink (hidden by setting display: inline in a css file), how can I achieve to animate this hyperlink to 'display:block'? Neither show() nor the following code .animate({ display: block }, { duration: 500 } do work! Anny suggestions? Cheers, cube

    Read the article

  • Jquery animate bottom problem

    - by andrea
    It's strange. I have an animation that start when i .hover on a DIV. Into this div i have another in position absolute that i want to move up until the mouse stay on main div and go down in your position when i go out of main div. A simple hover effect. I have write down this function that work well apart a strange bug. var inside = $('.inside') inside.hover(function() { $(this).children(".coll_base").stop().animate({ bottom:'+=30px' },"slow") }, function() { $(this).children(".coll_base").stop().animate({ bottom:'-=30px' },"slow"); }); i need +=30 and -=30 because i have to apply this function to a range of div with different bottom. The problem is that if i hover on and out of div the DIV animate right but when go down he decrease the value of bottom every animation. If i go up and down from the main div i see that the animated div go down even beyond the main div. I think that i miss something to resolve this bug. Thanks for any help

    Read the article

  • jquery animate from object center

    - by mtwallet
    Hi. I am trying to create a product viewer similar to the one at the bottom of this page http://www.logitech.com/en-gb/. As you can see the product animates from the center rather than top left which I think is Jquery's default. So what I am doing is trying animate the width and height and then also the offset to make it look like it animates from the center. My code looks like this: <style> body { background: black; } .box { background: #fff url('pic.jpg') no-repeat 0 0; width: 200px; height: 200px; margin: 10px 4%; float: left; } </style> <script type="text/javascript"> $(document).ready(function() { $(".box").hover(function() { $(".box").not(this).fadeTo(500, 0.5); $(this).animate({ width: 300, height: 300, left: -100, top: -100 }, 500); }, function() { $(this).animate({ width: 200, height: 200, left: 100, top: 100 }, 500); $(".box").fadeTo(500, 1); }); }); </script> I cannot seem to get this working as I want. Can anyone help with this or suggest a better technique? Many thanks

    Read the article

  • jquery animate background-position firefox

    - by Ohnegott
    I got this background image slider thing working in chrome and safari, but it doesnt do anything in firefox. any help? $(function(){ var image= ".main-content"; var button_left= "#button_left"; var button_right= "#button_right"; var animation= "easeOutQuint"; var time= 800; var jump= 800; var action= 0; $(button_left).click(function(){ right(); }); $(button_right).click(function(){ left(); }); $(document).keydown(function(event){ if(event.keyCode == '37'){ right(); } }); $(document).keydown(function(event){ if(event.keyCode == '39'){ left(); } }); function left(){ if(action == 0){ action= 1; $(image).animate({backgroundPositionX: '-='+jump+'px'}, {duration: time, easing: animation}); setTimeout(anim, time); } } function right(){ if(action == 0){ action= 1; $(image).animate({backgroundPositionX: '+='+jump+'px'}, {duration: time, easing: animation}); setTimeout(anim, time); } } function anim(){ action= 0; } }); I also tried this but it also does nothing $(image).animate({backgroundPosition: '500px 0px'}, 800);

    Read the article

  • Animate background image change with jQuery

    - by Jonathan Lyon
    Hi I finally have this working now but would like to know how I can use JQuery's animate function to make the background image changes fade in nicely when you hover over the list items on the homepage:- http://www.thebalancedbody.ca/ The Code to make this happen so far is:- $("ul#frontpage li#277 a").hover( function () { $('#homepage_container').css('background-image', 'url(http://www.thebalancedbody.ca/wp-content/themes/balancedbody_V1/images/nutrition_background.jpg)'); },function () { $('#homepage_container').css('background-image', 'url(http://www.thebalancedbody.ca/wp-content/themes/balancedbody_V1/images/default_background.jpg)'); } ); $("ul#frontpage li#297 a").hover( function () { $('#homepage_container').css('background-image', 'url(http://www.thebalancedbody.ca/wp-content/themes/balancedbody_V1/images/vibration_training.jpg)'); },function () { $('#homepage_container').css('background-image', 'url(http://www.thebalancedbody.ca/wp-content/themes/balancedbody_V1/images/default_background.jpg)'); } ); etc etc How would I add the ANIMATE function to this please - thanks!!! Thanks Jonathan

    Read the article

  • jQuery Animate width to the left and up

    - by efru
    Hi all- I'm trying to animate an image's width and height properties. Currently the image (as expected) animates to the right and down, however I'd like for the animation to occur to the left and upwards. Here's my current code : http://jsfiddle.net/7UbYy/ I've read a few other posts on this subject which all refer to setting a marginLeft or left property but I can't seem to get the desired effect. I need the image to animate to the left and upwards while remaining in place. Let me know if this is possible...I can't seem to think of a way to do it right now.. Thanks in advance. Appreciate it.

    Read the article

  • Text Getting weird when jquery animate fade on chrome

    - by Robson Silveira
    JavaScript $(function() { $('#lol').hover(function() { $(this).stop().animate({opacity:0.5}); },function() { $(this).stop().animate({opacity:1}); }); }); CSS #lol { padding:20px; background-color:#FF0000; color:#FFF; font-size:15px; font-family:arial; width:300px; opacity:1; filter:alpha(opacity=100); position:relative; } HTML <div id="lol">text</div> In Firefox and Internet Explorer it works fine but in Chrome, the text get weird on fade -- it look like that text is losing cleartype. How can I fix it? How it looks on fade: Click to see

    Read the article

  • Animate an Image after hovering an item a second

    - by mikep
    Hey, after some tries to get this to work, i ask you, if you know where my mistake is. This is my code until now: $(".menu a").hover( function () { $(this).data('timeout', setTimeout( function () { $(this).hover(function() { $(this).next("em").animate({opacity: "show", top: "-65"}, "slow"); }, function() { $(this).next("em").animate({opacity: "hide", top: "-75"}, "fast"); }); }, 1000)); }, function () { clearTimeout($(this).data('timeout')); }); i would be happy about some help.

    Read the article

  • jQuery - Animate function

    - by Arun Kumar
    I have a piece of code shown below: $(".tagArea li").mouseover(function(){ $(this).animate({ borderWidth: "2px" }, 1000 ); }); $(".tagArea li").mouseout(function () { $(this).animate({ borderWidth: "1px" }, 1000 ); }); When I try to hover it on a particular list item, it properly animates but doesn't stop doing just once. It keeps doing 2 or 3 times. How to avoid this, I 've tried many a times but no positive result occurs to me. Kindly help.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >