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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:36:38+00:00 2026-05-21T03:36:38+00:00

I have a dropdown country list using the jquery and stuff at http://jsfiddle.net/josh3736/jf5QK/ however

  • 0

I have a dropdown country list using the jquery and stuff at http://jsfiddle.net/josh3736/jf5QK/ however in that demo and mine when you select one from the dropdown, it doesn’t change the flag image, and it only briefly changes the country name? I’ve tried playing with it to no avail.

Any help?

  • 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-21T03:36:38+00:00Added an answer on May 21, 2026 at 3:36 am

    The country changes back because the form is posted and the dropdown is rebuilt when a country is chosen. The click event seems to propagate to something that is posting the form.
    This can be prevented by adding a e.preventDefault() to the click function:

    // when a language is clicked, make the selection and then hide the list
    $(".dropdown dd ul li a").click(function(e) {
        var clickedValue = $(this).parent().attr("class");
        var clickedTitle = $(this).find("em").html();
        $("#target dt").removeClass().addClass(clickedValue);
        $("#target dt em").html(clickedTitle);
        $languageList.hide();
        $dropTrigger.removeAttr("class");
        e.preventDefault();
    });
    

    I’ll try to look into it some more to try to find out why the flag isn’t changing.

    Edit:
    Seems as if someone else posted the solution to the flag issue before me 😛

    Anyway, this was the solution that I came up with:

    var clickedValue = $('em', this).attr("class");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using ASP.NET forms version 3.5 in VB I have a dropdownlist that
I'm planning to create a cascading dropdown list of Country--> State/Province--->Zip code using geonames.
I have a loop that displays a list of variables in a dropdown box
I'm using the jquery mask from Digital Bush: http://digitalbush.com/projects/masked-input-plugin/ I have a customer signup
I am using ASP.NET 3.5 I have a drop-down list called lstCountry with an
Here's the issue: I have a JS dropdown for country and state that runs
I have this drop-down list of countries: <select name=country> <option value=>Country...</option> <option value=Afganistan>Afghanistan</option> <option
I am having a project which will have country dropdown at the top to
I have dropdown list control in one of my application and when I add
I have a dropdown in my view to which i want to apply jquery(ajax

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.