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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:39:17+00:00 2026-06-12T23:39:17+00:00

Good day, Please assist: I am adding list items into an unordered list. Inside

  • 0

Good day,

Please assist: I am adding list items into an unordered list. Inside the list items I have an anchor that does not have an ID. I am trying to invoke the click event handler but obviously I am doing something wrong.

List item rendering:

this.RenderMeNav = function (params) {
        var ul, li, a, heading;
        var me = ARRAY.Search({
            List: params.Permissions,
            Properties: ["Group"],
            Value: "me"
        });
        heading = $("<a href=\"javascript:void(0);\" class=\"heading\">Me<span class=\"icon-vertical icon-up\"/></a>");
        ul = $("<ul />");
        for (var p in me) {
            li = $("<li></li>");
            a = $("<a href=\"" + me[p].Url.replace("~/", "") + "\">" + me[p].Name + "</a>");
            a.click(function (e) {
                ShowProcessing();
                ifrm.document.location.href = $(this).attr("href");
                e.preventDefault();
            });
            li.append(a);
            ul.append(li);
        }
        $("#menu").append(heading);
        $("#menu").append(ul);
    };

And then when something else is clicked, I call this function:

this.OpenSection = function (params) {
        $("#menu li").each(function () {
            if ($(this).text().toLowerCase() == params.Name.toLowerCase()) {
                $(this).click(); //I FOUND THE ANCHOR AND NOW I WANT TO INVOKE IT'S CLICK EVENT
            }
        });
    }

I tried some of the suggestions on the other questions which is similar, but to no avail.

Regards

  • 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-12T23:39:18+00:00Added an answer on June 12, 2026 at 11:39 pm

    You’re attaching the event to the anchor, but triggering the click of the list item. Try and find the anchor that’s in the list item and triggering it’s click:

    this.OpenSection = function (params) {
            $("#menu li").each(function () {
                if ($(this).text().toLowerCase() == params.Name.toLowerCase()) {
                    $(this).find("a").trigger("click");
                }
            });
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good day, please advise. I have a list of items: <List> <Item> <Description>Item 1</Description>
Good day, I have a class that implements the LoaderCallbacks, and hence have the
Good day I have a custom TextBox that has a IndicatorTextBox.ui.xml file as well
Good Day, I have a simple working routine in Perl that swaps two words:
Good day, Hope the tilte is not misleading. please take a look at the
Good day, I have like 15 images I need to be buttons. I have
Good day, all. I know that this is a pretty basic question in terms
Good day. I know that in order to save object state in Java I
Good day, please would like to know how to reduce the spaces between the
Good day. I'm still learning GWT so please help me. I'm working on a

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.