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/
精彩评论