How would you set the position:relative property in an element that does not have an initial position property set, within jQuery’s animate()?
This does not work:
$(mLinks[id]).animate
(
{
position:'relative',
left:'200px'
}
);
Given that mLinks is a valid DOM element object.
I also tried with the duration and callback parameters.
It does not make sense to “animate” the css
positionattribute isn’t it? There is nothing betweenrelativeandabsoluteorstaticor anything like that…This is what I would do:
If you read the corresponding jQuery doc, you will find this:
most properties that are non-numeric cannot be animated using basic jQuery functionality (For example, width, height, or left can be animated but background-color cannot be, unless the jQuery.Color() plugin is used).