【发布时间】:2012-07-26 02:20:49
【问题描述】:
我没有找到有同样问题的人,这真的很奇怪。
解释起来并不简单,所以我给你下面的链接稍微解释一下。
首先,这是我的代码:
<script type="text/javascript">
var close_feedback_box = function(){
$jquery('div#feedback').removeClass('feedback_bigger').animate({
top:'200px',width:'28px',height:'106px'}).find('p').hide();
$jquery('div#close_feedback_box').hide('fast');
}
$jquery(document).ready(function(){
$jquery('div#feedback a').hover(function(){
$jquery(this).addClass('hover');},function(){
$jquery(this).removeClass('hover');
});
$jquery('div#feedback').click(function(){
if(!$jquery(this).hasClass('feedback_bigger')){
$jquery(this).addClass('feedback_bigger').animate({
top:'147px',width:'300px',height:'212px'
},function(){
$jquery('div#feedback p').show()});
$jquery('div#close_feedback_box').fadeIn('slow');
}
});
});
</script>
<!-- feedback -->
<div id="close_feedback_box" onclick="close_feedback_box();"></div>
<div id="feedback" style="">
<p style="margin-top:30px;display:none;">You can take a few minutes to help us
improve user experience
<br/>and<br/><a id="">fill out our survey</a><br/>or<br/>
<a href="/index.php?option=com_jumi&fileid=11" id="">submit a direct feedback
</a></p></div><!-- end feedback -->
它在所有浏览器中都运行良好,但只要看看 Firefox,你就会明白我的问题,事实上,当显示 p 块时,它会选择所有文本,我真的不明白为什么。我试图将 p 块放在内部反馈 div 中(并显示 div),它没有改变任何东西。
你会在这里找到bug(仅在firefox中):https://execboardinasia.com/(点击左侧固定位置的反馈'按钮')。
非常感谢您花点时间为我服务!
巴斯蒂安·桑德
【问题讨论】:
-
你可以尝试在结束时返回 false $jquery('div#feedback').click()
-
如果我添加了一个 return false,它并不能解决问题,而且我里面的链接也不再起作用了......
标签: jquery firefox jquery-animate