【发布时间】:2014-05-17 07:44:31
【问题描述】:
我的 css 中有一个 photoshow 类。它们是图像。我希望它们在页面加载时淡出并淡入。任何 wysihtml5 的第一行工作正常。有什么想法吗?
控制台错误:
event.returnValue is deprecated. Please use the standard event.preventDefault() instead.
s
$(document).ready(function(){
$('.wysihtml5').each(function(i, elem) {
$(elem).wysihtml5();
});
$('.photoshow').fadeOut().fadeIn('slow');
})
这是 HTML
<%= link_to 'Back', :back %> <br>
<%#= @photo.name %>
<div class="photoshow">
<%= image_tag @photo.image.url, width: '500', class: 'photoshow' %>
</div>
【问题讨论】:
-
应该可以正常工作 -> jsfiddle.net/adeneo/zD7t5
-
有趣。我不知道这里发生了什么。 :(
-
打开控制台 (F12) 并检查错误?
-
刚刚更新了带有错误消息的原始帖子
-
$('.photoshow').fadeOut('slow', function() { $(this).fadeIn('slow'); }) 怎么样? chainig 和使用完整回调有区别吗?
标签: javascript jquery css ruby-on-rails