私はanimate.cssで作業します。jQueryで別のスクリプトの後にスクリプトを実行
index.htmlを
<h1>Example</h1><div class="instagram-widget"></div>
index.js
jQuery('h1').mouseenter(function() {
jQuery(this).addClass('fadeInUp').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
jQuery(this).addClass('fadeOutUp').removeClass('fadeInUp').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
jQuery(this).removeClass('fadeOutUp');
});
}); });
すべての作品である:私はこのようなHTMLを持っています!
私はAPIを備えたInstagramを持っています(私の写真を表示できます - APIで心配する必要はありません)。 index.jsにAPIコードを追加します。私はここにすべてのコードを入れて質問を簡潔にしてはいけません。私はその後、私はjQuery('h1').mouseenter(function() {
jQuery('.comment').mouseenter(function() {
にDoenst仕事を変更
jQuery('<a>').attr('href', url).append(// inside it, append an image jQuery('<img>').attr('src',src), jQuery('<div class="comment">').html(comment) ) // end append .appendTo('.instagram-widget')
を追加します。 1つのファイルでjQuery('.comment').mouseenter(function() {
と同時に実行される.comment
のように見えます。
QUESTION
どう.comment
作品を作るには?別のスクリプトが完全に終了した後にスクリプトをロードする関数はありますか?
競合を避けるために '.comment'を変更する方法はありますか? – claudios
@claudiosもっと説明できますか? – ucon89