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 706527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:10:35+00:00 2026-05-14T04:10:35+00:00

$(.container).hover( function(){ $(.child-1).hide(0); $(.child-2).show(0); },function(){ $(.child-1).show(0); $(.child-2).hide(0); }); A project I have requires that

  • 0
$(".container").hover(
     function(){
              $(".child-1").hide(0);
              $(".child-2").show(0);
     },function(){
              $(".child-1").show(0);
              $(".child-2").hide(0);
});

A project I have requires that I use mootools, but I never used mootools, and jquery makes much more sense to me. Can someone show me how this example would look like in mootools?
thanks

  • 1 1 Answer
  • 1 View
  • 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-05-14T04:10:36+00:00Added an answer on May 14, 2026 at 4:10 am

    MooTools uses two shorthand methods: $, and $$

    <div id="someId">..</div>
    <p class="someClass">..</p>
    
    Jquery           | MooTools
    -------------------------------
    $("#someId")     | $("someId")
    $(".someClass")  | $$(".someClass");
    

    In MooTools, $ is only used to search elements by ID, and $$ is for everything else. So the above can be implemented as:

    $$(".container").addEvents({
        mouseenter: function() {
            $$(".child-1").hide();
            $$(".child-2").show();
        },
        mouseleave: function() {
            $$(".child-1").show();
            $$(".child-2").hide();
        }
    });
    

    .hide() and .show() are shortcut methods that are part of Element.Shortcuts in MooTools-More, but you could define these yourselves if you want.

    But, if you’re comfortable with the jQuery syntax and it makes you productive, checkout this project Mooj by Lim Chee Aun. It allows you to use an almost jQueryish syntax in MooTools.

    If you have no particular reason to use only MooTools, checkout how to use MooTools with jQuery on David Walsh’s blog.

    If you’d like to use jQuery for the DOM and MooTools for the object-oriented goodiness, checkout this article by Ryan Florence.

    And finally for a great side-by-side comparison of both frameworks, checkout this definitive article by Aaron Newton.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: var originalBorder = container.css("border"); container.hover(function(event) { event.stopPropagation(); $(this).css("border", "1px solid
The best is to check out the example in http://jsfiddle.net/jDn7X/ $(.container.a1 div).hover(function(e){ $(.popup).show(300).css({top: (e.pageY
I have a code that resizes a container div on hover - and I
I have an image container with a caption and when I hover over it
I have a container class which I would like to use to print all
I have a container that is a popup over a page and it has
I have a white container on top of the bg but it stops even
I have the following: <div class=container> Test 1 <div class=child>Testing</div> </div> <div class=container> Test
I have the following code: $(#myDiv).hover( function () { $(this).clearQueue().animate({ backgroundColor: #d7df23, opacity: 0.95
In Theory I have a div (container) that when hovered over one of its

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.