dynamically changing the selector text
- by kelly
I have a 'next' button which fades out a div, shows another, changes out a graphic and then... I want it to change the actual ID of the 'next' button but neither .html nor replaceWith seem to be working.
I have this:
$(document).ready(function(){
$('#portfolio').fadeTo(500,0.25);
$('#account')
.animate({width:"10.1875em",height:"11.1875em",duration:'medium'});
$('#next2_btn').click(function(){
$('#content').fadeTo(300, 0.0, function() {
$('#content2').show(300, function() {
$('#next2_btn').$('#next2_btn'.value).html('<area shape="rect" coords="826,935,906,971" id="next3_btn" href="#">')
$('#account').fadeTo(500,1.0)
.animate({marginLeft:"220px", width:"2em",'height' :"2em",duration:'medium'})
.animate({
marginLeft:"400px",
marginTop:"35px",
width:"7em",
height:"7em",
duration:"medium"
}, 'medium', 'linear', function() {
$('#statusGraphic').replaceWith('<img src="state2_138x28.gif">');
})
.fadeTo(500,0.5);
$('#portfolio')
.fadeTo(500,1.5)
.animate({marginLeft:"-175px", width:"2em",height:"2.5em",duration:'medium'})
.animate({marginLeft:"-330px", width:"8.5em",height:"9.9375em",duration:'medium'});
});
})
})