Why doesnt this work properly ?
It should set input width to 300 on first click , and on body click to 100,
if anyone knows element clickout function for mootools please advise
what would be awesome is if u know how to set it back to original box size
window.addEvent('load', function() {
var box = $$('#searchfeed');
var isopen = box.hasClass('open');
box.addEvent('click', function myfunction(event) {
box.addClass('open');
box.morph({
width: 300
});
});
if (isopen) {
$(document.body).addEvent('click', function(event) {
box.morph({
width: 100
});
box.removeClass('open');
});
}
});
here’s a simple outerClick function.
use: