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

  • Home
  • SEARCH
  • 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 685589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:56:16+00:00 2026-05-14T01:56:16+00:00

Im using an existing widget from the jquery-ui labs call selectmenu. It has callback

  • 0

Im using an existing widget from the jquery-ui labs call selectmenu. It has callback options for the events close and open. The problem is i need in these event to animate a node that is part of the widget but not what its connected to. In order to do this i need access to this node.

for example if i were to actually modify the widget code itself:

// ... other methods/properties

"open" : function(event){
    // ... the original logic

    // this is my animation
    $(this.list).slideUp('slow'); 

    // this is the orginal call to _trigger
    this._trigger('open', event, $this._uiHash());
},

// ... other methods/properties

However when in the scope of the event handler i attach this is the orginal element i called the widget on. I need the widget instance or specifically the widget instance’s list property.

$('select#custom').selectmenu({
    'open': function(){
       // in this scope `this` is an HTMLSelectElement not the ui widget
     }
});

Whats the best way to go about getting the list property from the widget?

EDIT: note i posted my final solution below. However, i dont like having to go back out to the DOM to get the element, so id still be interested to hear the best practices for overriding/extending an existing widget or specific internals.

  • 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-14T01:56:16+00:00Added an answer on May 14, 2026 at 1:56 am

    So in the end it appears that i missed that the list is assing an id based on the name of the plugin and the original element id. so the following works:

    jQuery(function(){
        jQuery('select#custom').selectmenu({
            width: 100, 
            'style': 'dropdown',
            "open": function(e, data){
                var menu = jQuery('ul#'+$(this).attr('id')+'-menu');
                menu.hide().slideDown('slow');
            },
            "close": function(e, data){
                var menu = $('ul#'+jQuery(this).attr('id')+'-menu');
                menu.addClass('ui-selectmenu-open').slideUp('slow', function(){
                    menu.removeClass('ui-selectmenu-open');
                });
    
            },
            "change": function(){window.location = $(this).val();}
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 507k
  • Answers 507k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You are certainly not incompetent. Images do not have states,… May 16, 2026 at 3:59 pm
  • Editorial Team
    Editorial Team added an answer You have a problem with the identity of the Unit… May 16, 2026 at 3:59 pm
  • Editorial Team
    Editorial Team added an answer I don't know how to retrieve a school ID from… May 16, 2026 at 3:59 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm using the AutoComplete UI widget for a form to allow users to type
I am using the datepicker which renders incorrectly on my webpage. The date rows
I am using the JQUeryUI to present a Dialog Box to the end user
I've written basic jQuery plugins before, but I'm struggling to get my head around
Following on from this initial investigations on Silverlight architectures, I have some new requirements
I'm looking for a widget that behaves similar to the gallery widget but scrolls
I am starting out on a new project (well, restarting an existing one), and
I downloaded GraffitiCMS the other day(now open source and free), and like a lot
I am trying to implement a scenario using JSF. I have a commandExButton and
As the title says. Using the iPhone SDK, I want to RSA encrypt some

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.