これは数日間最後まで夢中になってしまった。私はJQueryでそれほど便利ではありません。私がやろうとしています何マウスオーバー機能を使用しようとすると無限ループエラーが発生する
http://tutorialzine.com/2010/03/sponsor-wall-flip-jquery-css/
はどこのMouseEnter上に画像を反転する関数を作成することであり、mouseleaveに、画像は元の状態に反転します: 私は担当ウォールプラグインを使用しています。
今は無限ループエラーが発生しています。
私はここに掲載いくつかのソリューションをしようが、我々は:-(運これは私のコードではありません。誰かが助けることができるならばそれは素晴らしいことだろう。
はどうもありがとうございました!!!$(document).ready(function(){
/* The following code is executed once the DOM is loaded */
$('.sponsorFlip').bind("mouseover",function(){
// $(this) point to the clicked .sponsorFlip element (caching it in elem for speed):
var elem = $(this);
// data('flipped') is a flag we set when we flip the element:
if(elem.data('flipped'))
{
// If the element has already been flipped, use the revertFlip method
// defined by the plug-in to revert to the default state automatically:
elem.revertFlip();
// Unsetting the flag:
elem.data('flipped',false)
}
else
{
// Using the flip method defined by the plugin:
elem.flip({
direction:'tb',
speed: 350,
onBefore: function(){
// Insert the contents of the .sponsorData div (hidden from view with display:none)
// into the clicked .sponsorFlip div before the flipping animation starts:
elem.html(elem.siblings('.sponsorData').html());
}
});
// Setting the flag:
elem.data('flipped',true);
}
});
});
これは回答ですか、それとも質問ですか? –
それは問題でしたが、私はお詫び申し上げます、あなたの前のコードを誤解しました。私は元の質問を更新しました! – Jack
完璧に見えますが、テキストは割り当てられていません。 – user1252509