0

对于调香师的网站,我在架子上展示了一排九瓶。它显示为一张连续的照片。我把它切成九个无缝切片,每个切片都在自己的表格单元格中,并有自己的 id。

我正在考虑使用 jQuery,因为我希望在翻转时使用以下内容:

* Bottle blitzes instantaneously bright also triggers short sound file.
* After a millisecond or two, returns to normal state.
* Action repeats only if blurred and re-moused over.
* Effect the same for each of the 9 bottles.

Mousedown(单击)可能不需要效果,只需将特定瓶子的页面定位到首页的 iframe 中。我做了9个alt。切片是白色的,但不知道如何编写具有定时效果的脚本。

闪光?请不要去那里;这让我很疯狂。OTOH,我发现 jQuery 很优雅。

4

1 回答 1

0
function pause(milis) 
{
var date = new Date();
var cur_date = null;

do { cur_date = new Date(); } 
while(cur_date-date < milis);
} 

功能pause()将允许您延迟效果。

$('.bottle').hover(
  function(){/*blitz and play*/}, //executed when mouse pointer enters the element
  function(){pause(2); /*deblitz*/})//executed when mouse pointer leaves the element
于 2010-08-06T13:24:17.177 回答