JSFiddle - React, Tailwind, and code Playground
by geekambassador
HTML
<link rel="stylesheet" href="http://www.greensock.com/_css/tour/greensock-theme/jquery-ui-1.9.1.custom.css">
<script src="http://www.greensock.com//js/src/tour/jquery/jquery-ui-1.9.1.custom.js"></script>
<script src="http://www.snorkl.tv/dev/libs/greensock/TweenMax.min.js"></script>
<div class="demoWrapper">
<div id="borderRadiusBox"></div>
<div id="borderRadiusNav">
<div id="br1" class="borderRadiusNavBox"></div>
<div id="br2" class="borderRadiusNavBox"></div>
</div>
</div>
CSS
.demoWrapper{
width:550px;
height:400px;
padding:1px;
margin:-1px;
background-color:#000;
}
#borderRadiusBox{
position:relative;
width:100px;
height:100px;
background-color:#91e600;
border: solid 4px white;
margin: 0px auto 0px auto;
}
#borderRadiusNav{
width:380px;
margin: 20px auto 0px auto;
}
.borderRadiusNavBox{
width:50px;
height:50px;
background-color:#555;
display:inline-block;
margin-right:10px;
cursor:pointer;
}
.borderRadiusNavBox:hover{
background-color:#777;
}
JavaScript
var br1 = $("#br1"),
br2 = $("#br2"),
box = $("#borderRadiusBox");
TweenLite.set(br1, {css:{borderRadius:"25%"}})
TweenLite.set(br2, {css:{borderRadius:"50%"}})
br1.mouseenter(function(){
TweenLite.to(box, 1.5, {css:{borderRadius:"25px"}});
});
br2.mouseenter(function(){
//switching to px below works as expected
TweenLite.to(box, 1.5, {css:{borderRadius:"50%"}});
});