I'm trying to have an image enlarge using jQuery while keeping it centered. I've tried adding a 'right'
animation property, but it hasn't helped.
Here is the live version of the page. Click on Student or Guest to see the animation.
jQuery:
var studFocusWidth = 1000;
var studFocusChange = 165;
var chartSpeed = 700;
function goToStud() {
$('#chart').attr("usemap", "studmap")
.animate({
'width': studFocusWidth,
'right': studFocusChange
}, chartSpeed)
.attr("src", "images/chartsfocus.png");
$('h3').html("Select a Section");
$('#chartback').addClass("studback").fadeIn(chartSpeed);
}
// There is a second function for the guest section
HTML:
<div id="chartframe">
<!-- image maps omitted -->
<img id="chart" src="images/chartstart.png" usemap="#chartmap" alt="Chart" />
</div>
CSS:
#chartframe {
width: 100%;
overflow: hidden;
text-align: center;
margin: 0px;
}
#chart {
width:640px;
position: relative;
}