Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to animate both the horizontal and vertical radii of border-top-right-radius using jQuery
    primarykey
    data
    text
    <p>Is it possible to animate this:</p> <pre><code>border-radius: 0 0 120px 120px / 0 0 90px 90px; </code></pre> <p>to this:</p> <pre><code>border-radius: 120px 120px 0px 0px / 90px 90px 0px 0px; </code></pre> <p>Using jQuery?</p> <p>I've tried the following, but cannot get it to work:</p> <pre><code>$('div.smile').animate({ borderTopLeftRadius: "120px 90px", borderTopRightRadius: "120px 90px", borderBottomLeftRadius: "0px", borderBottomRightRadius: "0px" }); </code></pre> <p>I realise that this is because I can only animate one property value at a time... Is there some way I can break down <code>borderTopLeftRadius</code> into its two radius components, e.g. <code>borderTopLeftRadiusHorizontal</code> and <code>borderTopLeftRadiusVertical</code>?</p> <p>I will accept a method using either pure jQuery or a jQuery plugin as the correct answer.</p> <p>See: <a href="http://jsfiddle.net/adamtsiopani/9pASU/19/" rel="nofollow">http://jsfiddle.net/adamtsiopani/9pASU/19/</a></p> <p>Many thanks! :)</p> <h1>Update</h1> <p>I think knowing the context of what I am trying to achieve as an end result is important here... I want to be able to dynamically change the length/duration of the animation based on other events - preferably even while it is mid-animation i.e. I want to be able to speed up, slow down or stop the animation before, after or while it is happening. I'm not sure if this is possible, or if I'm dreaming, but if anyone can share their experiences I'd appreciate it! :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload