javascript - trying to change width on click -


Concerrning, I wanted to get the same effect, then I thought I would just change the width of my div on click. / P>

I have a left sidebird and content device, and I have an image with an openclick, which hides the left sidebird and sets the right content width up to 100%.
This hides left sidebardev, but this content does not spread to 100%, strange thing happens when I press firebug to open, after the opening of it, the content is spread to 100% Anyone can know that what I am doing wrong?

Thanks

Here's some HTML:

  & lt; Div id = "content_holder" & gt; & Lt; Div class = "leftsidebar" id = "sidebar" & gt; .... & lt; / Div & gt; & Lt; Div class = "content" id = "content" & gt; .... & lt; / Div & gt; & Lt; / Div & gt;  

Here is javascript:

  var flag = false; Page.toogle = Function (id) {var x = document.getElementById ('content'); If (! Flag) {document.getElementById (id) .style.display = 'none'; X.style.width = '99% '; Flag = 1; } And {x.style.width = '683px'; Document.getElementById (ID) .style.display = ''; Flag = 0; }}  

leftsidebar has been passed in the above function as an argument

Here's some CSS:

  div Content {display: block; Swim left; Width: 683px; Align text: left; Margin-left: 10px; } Div.leftsidebar {padding-bottom: 20px; Width: 303px; Background: url ('left_holder.png') No duplication left below; }  Latest Updates:   

When I click back to the window's restart button and stand backwards. Besides, when I open firebug, I already mentioned it. Is there some kind of hack from javascript that can simulate this phenomenon?

More info

I have received some similar terms:

-> I need this recycling event when I myself Trigger the Page Tutorial function so that the Divi Styles correctly "post-text" itemprop = "text">

You can trigger the resize event handles with something like this Must be enabled:

  window.resizeBy (1,1); Window.resizeBy (-1, -1);  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -