jQuery Cloning tr on a table

mrsamazinzg

New Member
I want to clone my tr that has a class name cloneme inside a table please help me :(here is my html code :\[code\]<table cellspacing="10" class="tbll" ><tr><td>Choose Sub Heading</td><td><select name="subheading_id" style="min-width:145Px"> <option value="http://stackoverflow.com/questions/14555315/1" Sub heading Me</option> <option value="http://stackoverflow.com/questions/14555315/2" Sub heading Me 2</option> </select></td><td>&nbsp;</td></tr><tr classs="cloneme"><td>Choose Job Title</td><td><select name="jobtitles_id" style="min-width:145Px"><?php <option vhttp://stackoverflow.com/questions/14555315/alue="a" >A</option> <option value="http://stackoverflow.com/questions/14555315/b" >B</option> <option value="http://stackoverflow.com/questions/14555315/c" >C</option> <option value="http://stackoverflow.com/questions/14555315/none" >None</option> </select></td></tr><tr><td><div class="addjob" >Add another Job Title</div></td></tr></table>\[/code\]Here is my jQuery :\[code\] $(".addjob").click(function(){ var $clone = $('table.tbll tr.cloneme').clone(); $('table.tbll').append($clone); });\[/code\]thanks in advance..
 
Back
Top