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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:06:59+00:00 2026-06-11T10:06:59+00:00

This is a dynamically created filter list. Clicking on the Account link opens up

  • 0

This is a dynamically created filter list. Clicking on the Account link opens up a modal window with a list of the account names. Clicking on an account name causes a li element to appear in the filter sidebar. The problem is you are able at this moment to click on the link more than once and created an element even if it was the same information. What I need it to do is create an li only once per account listing. I have thought about using the not () selector and adding a class at the end of the action when an account name is clicked. The issue is they all share the same class of .account which is how JQuery is carrying out the action upon click. My question is first how do I get this to work because my not () line isn’t firing. Secondly, how do I get it to target only the one item that the user clicked on as opposed to all links with the class of account? This is the JSFiddle, but for some reason it doesn’t want to quite work because there is a lot of code from Bootstrap from the site: http://jsfiddle.net/rsxavior/puhdE/7/

This is the relevant code I am referring to:

<li>
    <a href="#accountModal" data-toggle="modal">Accounts</a>
    <!--Start Account Sort Modal-->
    <div class="modal hide" id="accountModal" tabindex="-1" role="dialog" aria-labelledby="accountLabel" aria-hidden="true">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <hgroup>
                <h4 id="accountLabel">Accounts</h4>
                <h6>(Choose an account's first letter to quickly sort)</h6>
            </hgroup>
            <ul class="nav nav-pills">
                <li><a href="#">A</a></li>
                <li><a href="#">B</a></li>
                <li><a href="#">C</a></li>
                <li><a href="#">D</a></li>
                <li><a href="#">E</a></li>
                <li><a href="#">F</a></li>
                <li><a href="#">G</a></li>
                <li><a href="#">H</a></li>
                <li><a href="#">I</a></li>
                <li><a href="#">J</a></li>
                <li><a href="#">K</a></li>
                <li><a href="#">L</a></li>
                <li><a href="#">M</a></li>
                <li><a href="#">N</a></li>
                <li><a href="#">O</a></li>
                <li><a href="#">P</a></li>
                <li><a href="#">Q</a></li>
                <li><a href="#">R</a></li>
                <li><a href="#">S</a></li>
                <li><a href="#">T</a></li>
                <li><a href="#">U</a></li>
                <li><a href="#">V</a></li>
                <li><a href="#">W</a></li>
                <li><a href="#">X</a></li>
                <li><a href="#">Y</a></li>
                <li><a href="#">Z</a></li>
            </ul>
        </div>
        <div class="modal-body">
            <ul>
                <li class="account"><a href="#">All</a></li>
                <li class="account"><a href="#">A Name</a></li>
                <li class="account"><a href="#">Another Account Name</a></li>
                <li class="account"><a href="#">Babcock Center</a></li>
            </ul> 
        </div>
        <div class="modal-footer">
            <ul class="pager">
                <li><a href="#">Prev</a></li>
                <li><a href="#">Next</a></li>
            </ul>
        </div>
    </div>
    <ul class="account-hidden-li"></ul>
</li>

And the JQuery going along with it:

$('.account:not('.selected-account')').click(function () {
    $('.account-hidden-li').append('<li class="account-select">Sample Account Name<a class="close" data-dismiss="alert" href="#">&times;</a></li>');
    $('.account').addClass('selected_account');
)};

Any help in this matter would be greatly appreciated!

  • 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-11T10:07:01+00:00Added an answer on June 11, 2026 at 10:07 am
    $(".account").click(function () {
    this.unbind("click");
        $('.account-hidden-li').append('<li class="account-select">Sample Account Name<a class="close" data-dismiss="alert" href="#">&times;</a></li>');
        $('.account').addClass('selected_account');
    

    } );

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

Sidebar

Related Questions

Im having trouble working grabbing a dynamically created image from this service: http://opsin.ch.cam.ac.uk/opsin/USER-STRUCTURE-TO-GENERATE.png Im
I have a script task that executes a dynamically created SQL restore statement. This
I have a form that is dynamically created, on this form are several radio
Here is my scenario. User fills out this large page which is dynamically created
Is this possible to create new {variable = x.something} and specify variable name dynamically?
I have some divs created dynamically this way: //here goes some loop, and everything
So I dynamically create 3 UIButtons (for now), with this loop: NSMutableArray *sites =
I am trying to dynamically create an XML file using php like this: header
I need to dynamically create textbox. This is my code, but with this I
I'm trying to dynamically create buttons at runtime with PyQT4.7 However, this being my

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.