title: Div displays half of itself twice - using swipe.js
body: <p>Trying to find a slider library that I don't need jQuery to operate. I have two images of different widths inside the same swipejs container as per the demo, </p>
  
  <pre><code>&lt;div id='mSwipe' style='background-color:#ffb6c1;width:300px;height:250px;position:relative; left:800px;' class='swipe'&gt;
    &lt;div id="swipewrape" class='swipe-wrap'&gt;
      &lt;div id="slideone" style="text-align:right;"&gt;&lt;img src="http://www.totallygaming.com/sites/default/files/rotor/Commercial%20Intelligence.JPG"/&gt;&lt;/div&gt;
      &lt;div id="slidetwo" style="text-align:right;"&gt;&lt;img src="http://in-formatio.com/wp-content/uploads/2012/02/ihop-free-pancake-day-20091-600x250.jpg"/&gt;&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div style='text-align:center;padding-top:20px;'&gt;
    &lt;button onclick='state_change();mySwipe.prev()'&gt;prev&lt;/button&gt;
    &lt;button onclick='state_change();mySwipe.next()'&gt;next&lt;/button&gt;
  &lt;/div&gt;
  
  &lt;script&gt;
  var state = 0;
  function state_change() //Dumb state change function
  {
     if(state)
     {
        state = 0;
        document.getElementById('mSwipe').style.width = "300px";
     }
     else
     {
       state = 1;
       document.getElementById('mSwipe').style.width = "600px";
  
     }
  }
  </code></pre>
  
  <p>I put in a simple little two-state state machine to see what I can do if I change the div-width before the slide effect kicks in. I put the size change in the callback methods include in swipejs at first to no avail. <strong>I just want to change the div size each time I push the button so the image coming in fits in it</strong></p>
  
  <p>On button presses, the div will resize to the right size, but it seems like for the big image (which is a stack of delcious pancakes), <strong>it'll slide over and display the half of the large image twice in the swipe div</strong>. I can change back to the smaller image just fine</p>
  
  <p><strong>If I open my chrome console, the full image shows, and I have no further problems</strong>. </p>
  
  <p>What's up with that?</p>
  
  <p><img src="https://i.stack.imgur.com/1BIn4.jpg" alt="enter image description here"></p>