I hope you can help
I'm relatively new to mootools (and brand new here), and I was working on a basic open closed div. This can be seen here: http://jsfiddle.net/jessicajet/2jZz5/ . It includes a script click link that I found elsewhere.
<script> window.addEvent('load', function() { Element.Events.outerClick = { base : 'click', condition : function(event){ event.stopPropagation(); return false; }, onAdd : function(fn){ this.getDocument().addEvent('click', fn); }, onRemove : function(fn){ this.getDocument().removeEvent('click', fn); } }; (function() { var opener = $('box2'); var boxtoopen = $('box'); var testmorph = $('test') boxtoopen.set('morph', { duration: 800, }); boxtoopen.addEvent('outerClick', function(event) { boxtoopen.morph(".openOff"); testmorph.morph(".openOff2"); }); opener.addEvent('click', function(e) { e.stop(); boxtoopen.morph(".openOn"); testmorph.morph(".openOn2"); }); })(); var clix = new dwClickables({ elements: $('.box2'), anchorToSpan: true }); }); </script>
It doesn't seem to work in ie7, although it seems to be compatible with other browsers?
Can someone help me solve this problem and give me some tips for future use?
Yours faithfully,
Jessica
source share