I have two columns, they both move to the left.
Inside the left column, I have a βtriggerβ to hide the right column, this causes the left column to expand 100% when the right column is hidden. Right now I can return the right column, but the problem is that the right column is wrapped under the left column (of course, the left column is 100% wide) and not next to it, as if it were started at the beginning.
I'm not a jQuery / JavaScript programmer, but I think I'm in a good way with my jQuery code.
Here is my HTML:
<div id="wrapper">
<div id="left-col">
<div id="trigger"><a href="#">Toggle</a></div>
<p>...</p>
</div>
<div id="right-col">Right Column</div>
<br class="clear">
</div>
This is the jQuery that I have so far:
$(function() {
$("#left-col").addClass("wide80");
$("#trigger a").click(function(){
$("#right-col").animate({width:'toggle'},350);
$("#left-col").animate({width:'100%'},350); return false
});
});
Any help you can give me would be greatly appreciated.
Thank.
source
share