Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • $("#ddlCity option").eq(0).prop('selected','selected'); Commented Mar 27, 2018 at 5:32
  • You have omitted an opening double-quote at the start of your style attribute value for select#cityID. That might not get parsed nicely in certain browsers. Commented Mar 27, 2018 at 5:32
  • its depend on Jquery version prop or attr Commented Mar 27, 2018 at 5:33
  • Please remove duplicate tag. None of the solution is working for me. Also please note it contains inside tag. Not sure if it is making any issue. Commented Mar 27, 2018 at 5:55
  • If this is not a duplicate, you should demonstrate that fact with a Minimal, Complete, and Verifiable example. Show your research in the body of your question. The accepted answer of the other question worked for nearly 1000 users. Most likely you are doing something wrong that you didn't include in the question (and you should probably ask a different one and include all of the code necessary to replicate the problem). Commented Mar 27, 2018 at 12:26