jquery Slider - how to calculate percentage
<p>I have made use of <code>var slideWidth = 420;</code> to specify sliders width and then <code>$('#slideInner').css('width', slideWidth * numberOfSlides);</code> to calculate all sliders width for long time and it was working fine with pixels</p>

<p><strong>Problem</strong></p>

<p>I need to use % and Jquery seems not to understand it.</p>

<pre><code>// slider
   var currentPosition = 0;
   var slideWidth = 420; // Use quotes('') for %  
   var slides = $('.slide'); // for each image
   var numberOfSlides = 4; // slides.length: show all images 

   // Remove scrollbar in JS 
   $('.slidesContainer').css('overflow', 'hidden');

   // Wrap all .slides with #slideInner div

   slides.wrapAll('&lt;div id="slideInner"&gt;&lt;/div&gt;').css({'float' : 'left','width' : slideWidth});

   // Float left to display horizontally, readjust .slides width
   /* 
   Set #slideInner width equal to total width of all slides
   #slideInner wraps all of our slides that has a width equal to total width of all .slide div.

   Problem: It needs a fix variable to calculate width    

   */

    $('#slideInner').css('width', slideWidth * numberOfSlides);  
</code></pre>
