_.throttle(function() {}, 250)
関数はでのみ起動していclick
ますか? 少し遅れてコードを実行しようとしているのですが、何らかの理由で機能していないようです。
return _.throttle(function() {
return ( $(this).hasClass('dataRevealed') ) ? $(this).addClass('animated fadeOut') : true;
}, 350);
編集:関数は次のようになります:
Application.CardView.prototype.removeSimilarCards = function(_container) {
return $(_container).find('[data-identifier="card-view"]').each(function() {
console.log("first");
_.throttle(function() {
console.log("inner");
return ( $(this).hasClass('dataRevealed') ) ? $(this).addClass('animated fadeOut') : true;
}, 350);
});
};