thumbnails - jQuery image rotate on hover -


any chance change image src on hover , count 10 , again first?

this need, default thumb, flv-3.jpg!

<img src="/thumbs/e/b/d/6/d/ebd6d2d6d99e/ebd6d2d6d99e.flv-3.jpg" /> 

on mouse hover need change number

  • flv-1.jpg
  • flv-2.jpg
  • flv-3.jpg
  • flv-4.jpg
  • etc..

up 10, , again , start number 1, when move mouse thumbs need default thumb flv-3.jpg

this im use not solutions,

var _thumbs = new array(); function changethumb(index, i, num_thumbs, path) {     if (_thumbs[index])     {                  document.getelementbyid(index).src = path + + ".jpg";          preload = new image();         preload_image_id = (i + 1 > num_thumbs) ? 1 : + 1;         preload.src = path + preload_image_id + ".jpg";         = % num_thumbs;         i++;         settimeout("changethumb('" + index + "'," + + ", " + num_thumbs + ", '" + path + "')", 800)     } }     function startthumbchange(index, num_thumbs, path) {         if (num_thumbs < 2) return false;     _thumbs[index] = true;     changethumb(index, 1, num_thumbs, path); } function endthumbchange(index, image) {     _thumbs[index] = false;     document.getelementbyid(index).src = image; } 

and html

<img onmouseout="endthumbchange('515e9279d96c6', '/thumbs/e/b/d/6/d/ebd6d2d6d99e/ebd6d2d6d99e.flv-3.jpg');" onmouseover="startthumbchange('515e9279d96c6', '10', '/thumbs/e/b/d/6/d/ebd6d2d6d99e/ebd6d2d6d99e.flv-','.jpg');" id="515e9279d96c6" src="/thumbs/e/b/d/6/d/ebd6d2d6d99e/ebd6d2d6d99e.flv-3.jpg" class="img"> 

and possible add effect fade when thumbs changed?

var timer;

$('div.settingsbutton').hover(function() {  var angle = 0,     $this = $(this);  timer = setinterval(function() {     angle += 4;     $this.rotate(angle); }, 50); }, function() {  timer && clearinterval(timer); $(this).rotate(0); 

here fiddle


Comments

Popular posts from this blog

asp.net mvc 3 - Using mvc3, I need to add a username/password to the sql connection string at runtime -

kineticjs - draw multiple lines and delete individual line -