开发者

Element prototype exceptions (not a function or method)

whatever i append to $('click_filter1') it shows the error ... is not a function (for show(), hide(), toggle())

if i insert an alert, the alert gets executed, so the framework is init ok

the element with the id exists 开发者_如何学Cfor sure

what can be the problem of this? why iam getting this error?

    $('click_filter1').addEvent('click', function() {
        $('click_filter1').show();
    }.bind(this));


First of all, your title is misleading and not descriptive enough.

Secondly, toggle, show, hide for Element is only available when you include Element.Shortcuts from MooTools-more - be sure to do that, and the code will work as expected.

Working example: http://www.jsfiddle.net/UjF2y/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜