未捕获的TypeError:对象[object Object]没有方法'overlay' [英] Uncaught TypeError: Object [object Object] has no method 'overlay'

查看:101
本文介绍了未捕获的TypeError:对象[object Object]没有方法'overlay'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么我的叠加层jquery代码会出现此错误?

Why do I get this error from my overlay jquery code?

这是代码:

jQuery(document).ready(function($) {

    // if the function argument is given to overlay,
    // it is assumed to be the onBeforeLoad event listener
    $("a[rel]").overlay({

        mask: 'darkred',
        effect: 'apple',

        onBeforeLoad: function() {

            // grab wrapper element inside content
            var wrap = this.getOverlay().find(".contentWrap");

            // load the page specified in the trigger
            wrap.load(this.getTrigger().attr("href"));
        }

    });
});

此代码是这样的叠加层: http://flowplayer.org/tools/demos/overlay/external.html

This code is the overlay like this: http://flowplayer.org/tools/demos/overlay/external.html

Halp?

ps。抱歉我的英文不好。

ps. Sorry for my bad english.

推荐答案

你需要加载 overlay jQuery之前的插件会将其视为对象的一部分;请参阅下文。

注意:插件必须在jQuery脚本之后

You need to load the overlay plugin before jQuery will see it as part of the object; see below.
Note: the plugin must come after the jQuery script

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script src="http://cdn.jquerytools.org/1.2.6/all/jquery.tools.min.js"></script>

这篇关于未捕获的TypeError:对象[object Object]没有方法'overlay'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆