Search Results

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

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

  • after dragging up, animate viewport up and after dragging down, animate viewport down...

    - by Luis
    I been trying to make this work for the last couple of days, I'm a new into web designing so I hope someone can help me out with this. I'm trying to run an animation after dragging the div container depending if the user is dragging up or down. This is the code that Im working on. this is the code when calling the jquery widget $ $('#container').draggable({scroll:true, axis: 'y', //scrollSensitivity: 1000, stop: function(event, ui) { if(scrollY <= 0){ $('#container').animate({ top: '-2000px' }, 500); } if(scrollY -= 0){ $('#container').animate({ top: '0' }, 500); } } });

    Read the article

  • jQuery .animate reveal contact form hidden in div with negative margin above header

    - by brhea
    Hi everyone, I've got my contact form hidden with a negative margin-top, so that when the visitor clicks "Contact" it reveals the div. <script type="text/javascript">$("#revealContact").click(function(){ $("#contact").animate({ marginTop: "+=620px" }, 1000); });</script> You can view it live here: http://www.brianrhea.com/index_contact.php -- click Contact link in top right My problem is that as soon as the form is submitted, it inherits the -620 margin and the success (or error) prompt is invisible. I'm running in to some other cross-compatibility issues as well with the margin spacing so I'm not even sure this is the best way to go about this. Obviously it'd be great if I could just begin with the div as display:hidden and then animate it to visible, but I haven't been able to do that. Any input is appreciated, either with advice on how to save the margin after form submission, or suggestion on better method to achieve this hide/reveal. Thanks, Brian

    Read the article

  • jquery animate() problem (syntax ?)

    - by meo
    $('#somediv').stop(false, true).animate({marginLeft: '-=' + e.width() + 'px'}, options.speed, function(){ options.onNewSlide() }) e.with() returns 640 opctions.speed contains 800 options.onNewSlide() contains a a custom callback function It works fine in firefox. But i debugged it with jquery.lint because it was throwing some random error in IE. lint tells me: When I called animate(...) with your args, an error was thrown! TypeError: c.speed is not a function { message="c.speed is not a function", more...} You passed: [Object { marginLeft="-=640px"}, 800, function()] and it indicates me the line i have posted. I have checked the jquery doc, but my syntax seams ok. Do you know what i am doing wrong? PS: i use jquery 1.4.2 from the google API you can see the error here: http://meodai.ch/slider/ (i know the code is under construction, but still)

    Read the article

  • Animate a e.Graphics.DrawLine with arrowhead

    - by Fer
    I need to "animate" an arrow. It can go in any direction (up, down, left, right and diagonals) and the arrowhead will be at the end. It needs to appear as if it is growing from orgin to the end. To make matters more complicated it has to be in a user control so it is possible to add to the controls collection in the forms and remove it to delete it from the screen, and its background is really transparent (no color.transparent) so i can't paint the background to "clear" the previous line. I have it static already (drawn from origin to end) but i can't animate it. I tried to add a timer in the user control but I fail to get a correct algorithm to calculate the intermediate ends of the line while it is growing. Any help would be appreciated. Thanks

    Read the article

  • How to use CSS3 to animate parts of an image

    - by Sang Froid
    I'd like to create an image slider with some cool 3d effects, such as this one: http://tympanus.net/codrops/2011/09/05/slicebox-3d-image-slider/ The thing is, while I know how to use CSS3 3D transforms to rotate something, I don't know how to animate "parts" of an image. In the link above, the script seems to somehow "slice" the image into several pieces, and then animate those separately. However, the image was not sliced up beforehand - it is one whole image. Can anyone recommend any tutorials on how to achieve this effect, or perhaps just give the name of whatever technique was used to do this? Thank you in advance!

    Read the article

  • jquery animate() problem

    - by meo
    $('#somediv').stop(false, true).animate({marginLeft: '-=' + e.width() + 'px'}, options.speed, function(){ options.onNewSlide() }) e.with() returns 640 opctions.speed contains 800 options.onNewSlide() contains a a custom callback function It works fine in firefox. But i debugged it with jquery.lint because it was throwing some random error in IE. lint tells me: When I called animate(...) with your args, an error was thrown! TypeError: c.speed is not a function { message="c.speed is not a function", more...} You passed: [Object { marginLeft="-=640px"}, 800, function()] and it indicates me the line i have posted. I have checked the jquery doc, but my syntax seams ok. Do you know what i am doing wrong?

    Read the article

  • jquery each to loop and animate

    - by medk
    I have some span tags: <span w="560"></span> <span w="340"></span> <span w="120"></span> With jQuery, I want to select EACH span, get the value inside its w attribute and animate it to that value + "px". I have a simple code that didn't work: $(document).ready(function(){ $('span').animate({width: $(this).attr('w') + 'px'}, 2000); }); Any Suggestions? Thanks.

    Read the article

  • JQuery animate behaviour with inline-block elements

    - by IlludiumPu36
    I'm using JQuery to animate two divs, one on top of the other, inside a another div. The effect is like a button with the top and bottom halves opening up and down to reveal some contents. The idea is to have a number of these 'buttons' in line using float:left When a button is clicked, the script checks if another button is open, if so, closes that button and opens the clicked button. This works fine, except I want to change float:left to display:inline-block on the container div class (to prevent wrapping of a number of buttons if the browser is resized). The problem is the layout of buttons breaks as JQuery animate seems to be changing the vertical position of the button containers while animating. See fiddle

    Read the article

  • animate each child jquery

    - by Martavis P.
    It's amazing how simple this should be but I can't get it to work. I'm looking to animate a set of divs one at a time. I am using animate.css for those familiar with it. I thought I may have found the answer here but jsFiddle is not working at the moment. Anywho, the code is $('.elements').each(function(i) { $(this).addClass('animated slideInLeft').delay(500); }); The problem is that when I debug and step through each element, the animation is happening for each element but when I let it run, it appears to all do it at once. What is needed to actually show the animation one at a time? Thanks EDIT: jsFiddle is back up and that link provided below did not help. The answer did not include looping through elements, but looping the animation itself. EDIT 2 Here is a Fiddle to play with if you guys need one.

    Read the article

  • How to fix IE ClearType + jQuery opacity problem in this script?

    - by Justine
    Hello, I'm having a rather common problem (or so it seems, after some googling around...) with IE messing both bold text AND transparent pngs while animating opacity using jQuery. You can view the sample here: http://dev.gentlecode.net/dotme/index-sample.html (only occurs in IE, obviously) I've seen some blog posts saying the fix is to remove the filter attribute but I'm not sure how to apply it to the script I'm using since I got it from a tutorial and am still learning jQuery... The script goes as follows: $('ul.nav').each(function() { var $links = $(this).find('a'), panelIds = $links.map(function() { return this.hash; }).get().join(","), $panels = $(panelIds), $panelWrapper = $panels.filter(':first').parent(), delay = 500; $panels.hide(); $links.click(function() { var $link = $(this), link = (this); if ($link.is('.current')) { return; } $links.removeClass('current'); $link.addClass('current'); $panels.animate({ opacity : 0 }, delay); $panelWrapper.animate({ height: 0 }, delay, function() { var height = $panels.hide().filter(link.hash).show().css('opacity', 1).outerHeight(); $panelWrapper.animate({ height: height }, delay); }); return false; }); var showtab = window.location.hash ? '[hash=' + window.location.hash + ']' : ':first'; $links.filter(showtab).click(); }); I would appreciate if someone could go over it and show me how to fix the opacity issue. Will the filter method also fix the trouble I'm having with transparent pngs having pixelated ugly borders like the bold type as well? Thanks in advance for all help!

    Read the article

  • Animate multiple UIView in a cicle

    - by Giovanni
    Hi all, i'm creating a card game on iphone. My problem is that i want to animate the cards at the beginning of the game making the cards animate from a point to another point in a deck. I move my cards that are UIView, in afor cicle. this is what i do With this code, alla tha cards move together, i need to move the cards separately one after another CGPoint point; // Create the deck of playing cards for (int i = 0; i < 28; i++) { CardView *aCardView = [self.mazzo objectAtIndex:i]; point.x = -100; point.y = 200; aCardView.center = point; aCardView.zPosition = i; [self.viewGioco addSubview:aCardView]; [aCardView release]; //Here i call the method to position the card [aCardView positionCard]; } in the card view there are this methods -(void)positionCard{ [self performSelector:@selector(_positionCard) withObject:nil afterDelay:0.0]; } -(void)_positionCard{ [UIView beginAnimations:@"posizionacarta" context:nil]; [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; [UIView setAnimationDuration:0.3f]; CGPoint point; point.x = 280 + ((arc4random() % 2) - 1); point.y = 240 + ((arc4random() % 2) - 1); self.center = point; [UIView commitAnimations]; [self setNeedsLayout]; }

    Read the article

  • IE8 problems with .animate() of opacity property - descendant remains opaque throughout

    - by Fabian
    Basically I have something like this: <ul> <li> <a> <div class="trigger-layer"></div> <div class="title-layer">Text here</div> <div class="hover-layer"></div> </a> </li> </ul> I use jQuery to animate the <ul> as follow: $ul = xxx (where I assign the selector to var $ul) $ul.animate({opacity: 0}, 1000, function() {$ul.css("display", "none")}); However in IE8, as the <ul> fades off, the <div class="title-layer">Text here</div> remains clear and opaque. Finally the animation ends, the display: none; property is applied onto the <ul> and the text disappears aburptly.

    Read the article

  • Why doesn't JQuery hover animate work in this example

    - by Christian
    When I hover over the box it doesn't change it's caller as I intent. What's wrong? <html> <head><title>test</title></head> <style type="text/css" > .box_type1{ width:560px; height:560px; background-color:#b0c4de; } </style> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('.box_type1').hover( function () { $(this).stop().animate({backgroundColor:'#4E1402'}, 300); }, function () { $(this).stop().animate({backgroundColor:'#943D20'}, 100); }); }); </script> <body> </div> <div class="box_type1"> </div> </body> </html>

    Read the article

  • jquery animate boxshadow

    - by mstef
    http://jsfiddle.net/mstefanko/w5aAn/877/ Below, i'm achieving the effect I wanted, but with a pending issue. Since i'm using a separate span and positioning it absolute over-top of a box with relative position. I can not access the inputs until after the animation is finished. I'm guessing the only way to alleviate this would be do something similar with just animating the border of the outer box? But nothing I was doing to animate box-shadow:inset was working. HTML <div id="wow"> <span id="pulse"></span> <input id="form-input"/> <input id="form-input"/> </div>? CSS #wow { width: 500px; height: 200px; display: inline-block; position: relative; border: 1px solid black; } #pulse { width: 100%; height: 100%; box-shadow:inset 0 0 20px #6c95c3; -moz-box-shadow:inset 0 0 10px #6c95c3; position: absolute; z-index: 20000; } JS $('#pulse').stop().animate({"opacity": 0}, "fast"); $('#pulse').effect("pulsate", { times:4 }, 500, function() { $(this).remove(); });

    Read the article

  • Jquery Knob animate and change color

    - by user1468116
    I'd like to create a knob that switch color at some point. For example, at 35 is red, at 70 is yellow and 100 is green. I also would like to make it animate. this is my fiddle: http://jsfiddle.net/Tropicalista/jUELj/6/ My code is: enter code here $(document).ready(function() { $('.dial').val(13).trigger('change').delay(2000); $(".dial").knob({ 'min':0, 'max':100, 'readOnly': true, 'width': 120, 'height': 120, 'fgColor': '#b9e672', 'dynamicDraw': true, 'thickness': 0.2, 'tickColorizeValues': true, 'skin':'tron' }) });

    Read the article

  • Android: how to hide and then show View with animation effect?

    - by tomash
    I have similar question like this one: http://stackoverflow.com/questions/2079074/update-layout-with-the-animation Basically: I have one vertical LinearLayout View with edittext, button and then list. I'd like to hide exittext after pressing button to make more space for list (button will go up). On second press edittext should be visible again. Edittext and button have "wrap_content" height. I'd like to hide and show edittext with animation. I succeeded to animate hiding by overloading Animation's applyTransformation: final float edittextheight= edittext.getHeight(); [....] @Override protected void applyTransformation(float interpolatedTime, Transformation t) { super.applyTransformation(interpolatedTime, t); android.view.ViewGroup.LayoutParams lp = edittext.getLayoutParams(); lp.height = (int)(edittextheight*(1.0-interpolatedTime)); edittext.setLayoutParams(lp); } Problem: I don't know how to calculate height to animate showing - edittext.getHeight(); returns 0 when widget is hidden and in layout definition I'm using "wrap_content". Help?

    Read the article

  • Animate move and scale of image UIButton

    - by Sam V
    I want it to be animated so I'm using [UIView beginAnimations] I've tried animating using button.imageView.frame (with image set as imageView) but it only animates the position, the image doesn't get scaled down at all. using hateButton.frame (when image is set as backgroundImage), the backgroundImage gets scaled down but it's not animated. How do I animate-scale a UIButton image?

    Read the article

  • PulpCore music playback - loop sound and animate volume

    - by Peter Perhác
    I have been experimenting with PulpCore, trying to create my own tower defence game (not-playable yet), and I am enjoying it very much I ran into a problem that I can't quite figure out. I extended PulpCore with the JOrbis thing to allow OGG files to be played. Works fine. However, pulpCore seems to have a problem with looping the sound WHILE animating the volume level. I tried this with wav file too, to make sure it isn't jOrbis that breaks it. The code is like this: Sound bgMusic = Sound.load("music/music.ogg"); Playback musicPlayback; ... musicVolume = new Fixed(0.75); musicPlayback = bgMusic.loop(musicVolume); //TODO figure out why it's NOT looping when volume is animated // musicVolume.animate(0, musicVolume.get(), FADE_IN_TIME); This code, for as long as the last line is commented out, plays the music.ogg again and again in an endless loop (which I can stop by calling stop on the Playback object returned from loop(). However, I would like the music to fade in smoothly, so following the advice of the PulpCore API docs, I added the last line which will create the fade-in but the music will only play once and then stop. I wonder why is that? Here is a bit of the documentation: Playback pulpcore.sound.Sound.loop(Fixed level) Loops this sound clip with the specified volume level (0.0 to 1.0). The level may have a property animation attached. Parameters: level Returns: a Playback object for this unique sound playback (one Sound can have many simultaneous Playback objects) or null if the sound could not be played. So what could be the problem? I repeat, with the last line, the sound fades in but doesn't loop, without it it loops but starts with the specified 0.75 volume level. Why can't I animate the volume of the looped music playback? What am I doing wrong? Anyone has any experience with pulpCore and has come across this problem? Anyone could please download PulpCore and try to loop music which fades-in (out)? note: I need to keep a reference to the Playback object returned so I can kill music later.

    Read the article

  • UITableView cell animate background

    - by psychotik
    I have a UITableView with a bunch of rows. When some action occurs, I want to animate the background of a cell. I just want to make it grey and then fade it back to the default in .5 seconds. Is my only option to set the background and call [tableView beginUpdates] followed by [tableView endUpdates] and then set a timer to clear the background again, or is there some more fundamental animation technique I can use here?

    Read the article

  • jQuery color plugin: onMouseOver animation causes flickering in FF3.5.5

    - by rt-uk
    I'm trying to change the background color of a div on mouseover and mouseout. Instant change to yellow on MouseOver, and slow fade on MouseOut. function hilightel(keydiv) { $('#'+keydiv).animate({ backgroundColor: '#ffffd3' },1); } function lolightel(keydiv) { $('#'+keydiv).animate({ backgroundColor: '#ffffff' },300); } < div onMouseOver=javascript:highlightel('item1'); onMouseOut=javascript:lolightel('item1'); id='item1'CONTENT< /div When the mouse moves over text within the div, though, it thinks I've moused-out and so flickers badly. Alternatives that don't work: - animateToClass doesn't support background-color so I'm using the 'color' plugin - I hear that switchClass doesn't work in Chrome - Can't use .hover because their will be dynamically named divs in the page so need a general function Thanks in advance...

    Read the article

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