小编anj*_*ash的帖子

$('#id').点击功能不起作用

它在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)

这是小提琴


注意

我试过了:

  1. 添加document.ready()包装脚本 - 不工作

  2. $('#activator3').on('click', function(){}); - 不工作

任何帮助,将不胜感激.

html javascript jquery

0
推荐指数
1
解决办法
99
查看次数

标签 统计

html ×1

javascript ×1

jquery ×1