views:

33

answers:

0

Possible Duplicate:
dynamically changing the selector text

I had posted this in the morning but the post is gone? I have the code below. I am trying to make jquery change the actual ID after I click. It's just one of a small list of chores that the script does. It all works except for changing the ID. Having that line in here makes it not work...because that doesn't work! Here is the code:

$(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').attr("id", "next3_btn");

            $('#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:"-220px", width:"12em",height:"12.5em",duration:'medium'})
.animate({marginLeft:"-330px", width:"10.1875em",height:"11.875em",duration:'medium'});
});
    });
});
// end all action for first click from first pane


 });//end doc ready