English 中文(简体)
我如何用 j子 an笑 elements子。
原标题:How do I animate elements with jQuery?

How do I say, slide an element a few pixels to the side from its initial position using jQuery? I know there is an animate() function but I have no idea how to use it. Tips, tutorials would be appreciated.

http://www.un.org。

我现在试图改变变迁因素的背景(我也希望最终放弃背景形象,但现在不是这样......)

I m目前使用以下代码。 什么错误? (连接是指一个部件的bu子)

  //light up links on  mouseover
  $(".link").mouseover(function(event){           
    $(this).animate({ color  :  #000099 }, "fast");
  });

  //dim link on mouseout
  $(".link").mouseout(function(event){       
    $(this).animate({ color  :  #efefef }, "fast");                
  });
最佳回答

首先,读到的文件,animate

然后,你必须界定你试图将其<代码>>属性”移至relabsolute, 途经特别安全局或j Query。

如果您将其设定为<代码>relative,那么你只能提供你希望将其移至:

// Will move #element right 10 pixels in 500 milliseconds
$( #element ).animate({
    left: 10px
}, 500);

如果你选择绝对的位置,你必须首先确定使用<代码>.offset(.left的成分的起始位置,并将所期望的颜料添加到该位置上,然后与这一职位相匹配。 例如:

// Will move #element right 10 pixels in 500 milliseconds
$( #element ).animate({
    left: $( #element ).offset().left + 10
}, 500);

如果母体元素处于固定位置,则这项工作就可进行(否则将抵消)。 左边与绝对左边价值相对应。

问题回答

i 真正热爱这个场所,这是它 recourse爱的。

http://jqueryfor Designers.com” rel=“nofollow noreferer”>j 履历





相关问题
images sliding continuously with <table> and jQuery

I m trying to write a little test page that circulates images through a window (see image). I have colored boxes inside a table (gray border), with each box being a element. <table id="boxes" ...

WPF 3d rotation animations

I have a few 3d rectangles on my screen that I want to pivot around the Y axis. I want to press down with the mouse, and rotate the 3d object to a max rotation, but when the user moves their mouse, ...

Disable Windows 7 touch animation in WPF

In Windows 7 when you touch the screen there is a short animation that occurs at the touch point. In my WPF app I want to display my own touch points, without showing the one supplied by Windows. ...

jQuery block moving

I wanna move a div block to the top, so I coded like this: CSS part: .movingPart{ margin-top:80px; } jQuery part: $(document).ready(function() { $( #btn ).click(function() { $( .movingPart )....

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. ...

Visual State Manager VS Animations in WPF

There is a lot of talk about the simplicity of Visual States and the transitions between them in WPF/Silverlight. I have the need to generate animations dynamically at runtime, to animate the ...

Create a ImageIcon that is the mirror of another one

I ll like to know if there is a way to create a ImageIcon that is the mirror of another ImageIcon. Searching on Google, I found how to do it by using many AWT libraries. Is there a way to do it with ...

how to drag in the animation in iphone application?

Iphone application is using the static co-ordinates to reach at some points in the application,which is based on the button event. But what i want is when i drag the item than it should reach at some ...

热门标签