0

調香師のウェブサイトで、棚に 9 本のボトルを並べて表示しています。一枚の連続した写真のように見えます。これを 9 つのシームレスなスライスに切り分け、それぞれが独自の 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.

マウスダウン (クリック) はおそらく効果を必要とせず、その特定のボトルのページをフロント ページの 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 に答える