I have javascript code which alters the width of a specified DIV. It is attached to a button so each button click adds 50px to the width attribute. But when the page is refreshed on the browser the div attribute goes back to what it was originally. This is the setWidth function:
function setWidth(){
jQuery('.tab_panel').each(function(){
jQuery(this).css({width: (jQuery(this).width() + 50) + 'px'});
});
}
it is called when I click the button. How do I save the attribute to a cookie so it stays between page refreshes? Thanks