Is there any method to rename a div element. I have a div with id fm_
form_
container,which lists a set of forms. If I click a link in a tab,for eg, My Forms, I want the name of this fm_
form_
container to change as tab_
content_
container. That is, all my forms should come inside the div, tab_
content_
container.
Is there any method to rename a div,like append and addClass?
EDIT
These are the css for the div id "fm_
myforms_
container and tab_
content_
container.
.tab_content_container
{
width:100%;
background-color:#FFFFE1;
border:1px #EEEEEE solid;
}
#fm_myforms_container
{
width:100%;
background-color:#FFF;
border:1px #EEEEEE solid;
}
If I give,
$('#myForms').click(function(){
//$("#fm_myforms_container").attr("id", "tab_content_container");
$("#fm_myforms_container").addClass("tab_content_container");
viewAllMyForms();
});
the CSS for tab_
content_
container does not get applied.