它在localhost上完美运行,但它在服务器上不起作用.
当我点击"开始免费试用"锚文本时,它不起作用.警报未显示.可能是什么问题呢?
<script>
$(function() {
$('#activator3').click(function(){
alert('huan');
$('#overlays3').fadeIn('fast',function(){
$('#boxs3').animate({'top':'80px'},500);
});
});
$('#boxclose3').click(function(){
$('#boxs3').animate({'top':'-500px'},500,function(){
$('#overlays3').fadeOut('fast');
});
});
});
</script>
<a href="javascript:void(0)" style="" class="activator3" id="activator3">
<div id="indexpack2" style="">Start Free Trial</div>
</a>
Run Code Online (Sandbox Code Playgroud)
这是小提琴
我试过了:
添加document.ready()包装脚本 - 不工作
$('#activator3').on('click', function(){}); - 不工作
任何帮助,将不胜感激.