Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8525455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:58:57+00:00 2026-06-11T07:58:57+00:00

Why doesnt this work properly ? It should set input width to 300 on

  • 0

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

http://jsfiddle.net/V6bTN/10/

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');

        });
    }



});​
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:58:59+00:00Added an answer on June 11, 2026 at 7:58 am

    here’s a simple outerClick 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);
        }
    };
    

    use:

    el.addEvent('outerClick', function(){ this.destroy(); });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This evaluation in sql doesn't seems to work properly for some reason but i
another sql problem of mine .. this time the reader doesn't work properly (
Why doesnt this map work, in Firefox? <img usemap=m_one id=one src=/images/layout/town_and_country/Town__Country_Web_Map.jpg alt=Town__Country_Web_Map border=0 height=507
Im using oslib with the pspsdk toolchain and for some reason this doesnt work
Im trying to understand how class generics work and this bit just doesnt make
This code used to work but doesnt any more. i used a breakpoint, and
This works perfectly in Firefox but doesnt work in ie i get the following
My baldness is growing more rapidly than it should be. I first posted this
This code doesn't work propely: I call a function passing a variable What's the
Why doesn't this work? Some Usercontrol (name: myUserControl) with an image control (name: myImage):

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.