aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

jQuery Clone (Copy) Dropdown List with Selected Value

Jul 9, 2014

Here I will explain how to use
jQuery to copy or clone dropdown list with selected option or jQuery copy dropdown value to another dropdown.

In previous articles I explained jQuery get radio button selected value by name, jQuery pdf viewer plugin examples, jQuery news ticker plugin examples,
jQuery dropdown with images, jQuery Countdown timer script example and many articles relating to jQuery in Now I will explain how to get clone dropdown list using jQuery.

If we want to clone dropdown list using jQuery we need to write the code like as shown below

$('#ddlcountry').clone().attr('id', 'choices_' + $(this).index()).insertAfter("#ddlcountry");

If you want to check it in complete sample we need to write the code like as shown below

<head id="Head1">
<title>jQuery Clone Dropdown list with selected value</title>
<select id="ddlcountry">
<option value="0">select</option>
<option value="india">india</option>
<option value="usa">usa</option>
<option value="canada">canada</option>
<input type="button" id="btnclone" value="Clone Dropdown">
<script type="text/javascript" src=""></script>
<script type="text/javascript">
$(function() {
$("#btnclone").click(function() {
$('#ddlcountry').clone().attr('id', 'choices_' + $(this).index()).insertAfter("#ddlcountry");

Live Demo

To check live demo try to click on below button to create new dropdown list with selected value

Clone Dropdown: 

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


Unknown said...

Nice Article sir, Please tell me how to find ID of cloned ddl.

Fahim Ahmed said...

How to save data of each ddl in database?
pls help

nikhil said...


Anonymous said...

very good article...

Anonymous said...

Sir, I am having a similar requirement but with subsequent dropdown list, the selected items in previous dropdown lists need not be present.Please shed light.

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.