jquery-animate

loop through a javascript object

此生再无相见时 提交于 2019-12-24 23:26:44
问题 I have a javascript object that looks like this, var telephones = { /* "phone" : { duration : time it takes to animate element in, leftIn : position of element once on the incoming animation leftOut : position of element on the outgoing animation delay : delay between two animations } */ "phone1": { duration : 850, leftIn : "408px", leftOut : "9999px", delay : 0, }, "phone2" : { duration : 600, leftIn : "962px", leftOut : "999px", delay : setDelay(), }, "phone3" : { duration : 657, leftIn :

How to delay a hyperlink until a CSS animation ends?

元气小坏坏 提交于 2019-12-24 17:40:36
问题 I'm trying to get the anchor tag to redirect as soon as the CSS animation ends. I tried capturing the href in jQuery and using 'setTimeout' to cause a delay before going to the anchor location (this is what was recommended in previous threads), but it hasn't been working. $(document).ready(function() { $('.section').click(function() { var goTo = this.getAttribute("href"); //HOLDS HREF var $elementA = $('.section').bind('webkitAnimationEnd', function() //ANIMATION BEGIN { $(this).removeClass(

Tricky thing about pointers to animate something in Delphi

情到浓时终转凉″ 提交于 2019-12-24 13:37:22
问题 So, I don't even know how to write the proper title. What I want to do is to animate the position of lets say a progressbar. One could discuss how to do this with timers and loops and so on. However, I want to be able to do something like this: ProgressBar1.Position:=Animate(ToValue); or Animate(ProgressBar1.Position, ToValue); Is this possible? creating a component inherited from an integer didnt work. I tried number 2 using pointers and made this procedure procedure TForm1.Animate(ToValue:

Cancel Jquery Slider event on mousehover

无人久伴 提交于 2019-12-24 12:44:21
问题 I wrote the following code to attempt to cancel an event on mousehover. the goal is to keep the slide event from happening if a slide is currently being hovered. Is it possible to cancel the slide event if the current slide is being hovered? Here is my code: Jquery <script type="text/javascript"> $(document).ready(function(){ var currentPosition = 0; var slideWidth = 560; var slides = $('.slide'); var numberOfSlides = slides.length; // Remove scrollbar in JS $('#slidesContainer').css(

How to fill svg when scrolling

社会主义新天地 提交于 2019-12-24 11:49:16
问题 I have svg line: <svg class="filling" width="500" height="10" version="1.1" xmlns="http://www.w3.org/2000/svg"> <path data-over-line="" d="M90,5 L500,5" stroke="#e2e2e2" fill="transparent" stroke-width="4" style="stroke-dashoffset: 0px;"></path> </svg> I need when scroll the page it is gradually filled with a different color. How to do it? 回答1: I am not sure what shape you ultimately want for your scrollbar, but here is a simple solution. We draw a blue line on top of your grey line to

jquery can you fadeIn a video

天大地大妈咪最大 提交于 2019-12-24 11:14:42
问题 I have a flv file inside the vid.html which is working fine, but is there any way to have the video itself to fadeIn/fadeOut? <div id="fadeit"> <div class="video"></div> </div> this does not work; $('.video').hide().fadeIn().load('vid.html'); wrapping it in a div and fading the div does not work either; $('#fadeit').hide().fadeIn(1400); 回答1: no wmode or wmode transparent: FF, Chrome and Safari wmode opaque, FF, Chrome, Safari and IE8 (only have ie8 to test) Both fade flash and div overlay.

jQuery scroll to top with .animate - jumps to bottom first?

戏子无情 提交于 2019-12-24 11:06:03
问题 I have the following jQuery snippet $('html, body').animate({ scrollTop: 178 }, 2000); I have some pagination buttons at the bottom of the page, that trigger a javascript function when they are clicked. In this JS function, the above snippet is called. This works fine to scroll the page back to the top just above the menu, but first of all the page seems to jump down to the very bottom abruptly (unless you are already at the very bottom) before scrolling up like it should? I am tearing my

Script to animate height of DIV is changing the height of DIV suddenly

寵の児 提交于 2019-12-24 10:05:10
问题 I have the following script which was working using slideUp and slideDown effects, but isn't working properly when animating the height of a DIV: $(function () { var myTimer, myDelay = 500; $('.slide, .the_menu').hover(function () { //when either a `img.menu_class` or a `.the_menu` element is hovered over, clear the timeout to hide the menu and slide the menu into view if it already isn't clearTimeout(myTimer); $('.the_menu').animate({height:'37px'},'fast', function () { $('.the_menu').stop

D3 transition along segments of path and pause at coordinate values

不想你离开。 提交于 2019-12-24 08:58:58
问题 I would like to be able to click on a circle (coordinate points); bring the marker to the position of the circle and pause at the position of the circle and then resume again along the path. In addition I would like to activate a circle when marker is paused on them - they are clicked (or their Voronoi cell is clicked). My intention is to have an on click function to an href for the circle coordinates eventually. I think I need to pass the index of the path coordinates into the translateAlong

Bouncing ball 5 times jquery/javascript beginners level

☆樱花仙子☆ 提交于 2019-12-24 08:19:51
问题 I am quite new to js and jQuery and wanted to achieve a simple animation that has been discussed many times here: a bouncing ball. However, I did not find the answer to my specific question as topics discussed already were much more sophisticated. I want a quite simple animation: five bounces and stay on the ground with the sixth. That one I have achieved so far. But for the five bounces I want to decrease the distance of bounce by 20% of the initial distance. Say the distance is 100, it