Sams04
Programmer
- Sep 10, 2013
- 1
Its working but when i browse the site its change to fixed.
Code:
<html>
<head>
<script type='text/javascript' src="[URL unfurl="true"]https://code.jquery.com/jquery-latest.min.js"></script>[/URL]
<script type='text/javascript'>
function ChangeWidth(width , state)
{
$('container').setStyle({ width: width, minWidth: width });
$$('.width').invoke('setStyle', { width: width, minWidth: width });
tem.global.showInlineNotification( 'Width changed to ' + state,{ 'displayForSeconds': 5 } );
tem.Cookie.set( 'width_state', state );
}
document.observe("dom:loaded", function(){
$("change_width").observe('click', function() {
if(ipb.Cookie.get( 'width_state' ) == 'fluid')
{
ChangeWidth('1000px','fixed');
}
else {
ChangeWidth('90%','fluid');
}
});
});
</script>
</head>
<body>
<div class = "width">
<div id="container" class="clearfix">
<a href="#" id="change_width"><img src="width.jpg" alt="Change Width"></a>
</head>
</html>