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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:18:37+00:00 2026-05-15T10:18:37+00:00

how to create own function and call it another function? like- $(‘.mycls li’).hover(function() {

  • 0

how to create own function and call it another function? like-

$('.mycls li').hover(function() {    
var divid = $(this).find('li').attr('some_attr');
call myfunc(divid);
});

function myfunc(divid)
{
$(divid).show();
//I want to hide rest all divs 
$('div#info1').hide();
$('div#info2').hide();
$('div#info3').hide();
}

I have 2 questions one is how to implement this logic in jquery second is which attribute can be used to reference the specific li to specific div

my divs are as-

<div id="info1">
//some information
</div>
<div id="info2">
</div>
....
  • 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-05-15T10:18:38+00:00Added an answer on May 15, 2026 at 10:18 am

    Your functions should be able to operate on the wrapped set like other methods/functions of jquery. Consider a plugin, it is easy:

    jQuery Plugin Tutorial

    Or see:

    Defining your own functions in jQuery

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

Sidebar

Related Questions

I create my own style attribute like this: <attr name=color_foreground format=color|reference /> and I
I want to create my own SeekBar because I can't find anything like with
Does such function exist? I created my own but would like to use an
I wish to create own events and dispatch them. I never done this before
When I want to create and use a function what accepts another function in
I want to create own filetype to save objects in my app. Basically, I
In Wordpress it's possible to create own WP Querys for the loop. An example
I create my own class which extend ScrollView but scroll bar disapear. How Can
I create my own FrameworkElement and override VisualChildrenCount{get;} and GetVisualChild(int index) by returning my
I try to create my own linux bash script that calls truecrypt for mounting.

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.