Javascript Onclick
<p>I want to achieve a very simple effect to scroll divs when pressing an arrow button ... How do i do this?</p>

<p>Basically i have a maximum of 4 divs named:</p>

<p>Slideframe, slideframe1, slideframe2 and slideframe3</p>

<p>I have a PHP variable called count which generates the slideframe content based on a PHP loop which increments a variable called $count.</p>

<p>Therefore the count variable can be between 0 and 3.</p>

<p>I want buttons to scroll divs left and right based on the count variable
If the count variable is 0 then no scroll buttons would appear.
If the count variable is 1 or 2 then both left and right scroll buttons would be visible and woudl scroll the relevant divs.
lastly if count = 3 then only a left arrow would be visible.</p>

<p>this is the javascript i use (in conjunction with jqmin liibary) to move the divs:</p>

<pre><code>$(document).ready(function(){ 

 $("#one").click (function(){
          if (navi =1){
 $(".slideframe").animate({opacity: "0.1", left: "-=960"}, 1200);
 $(".slideframe1").animate({ left: "-=960"}, 1200);
  }
 }); 
});
</code></pre>

<p>"#one" = the id of the left arrow image.</p>

<p>Whats the simplest way of doing all of this?</p>

<p>thx</p>
