remove() in jquery not working - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: remove() in jquery not working (/showthread.php?tid=43806) |
remove() in jquery not working - El Forum - 07-24-2011 [eluser]mehwish[/eluser] Hi can anyone tell me why remove() is not working in the following code Code: $("#mydropdown_for_month").change(function(){ I have two select boxes with ids "mydropdown_for_month" and "mydropdown_for_day". The problem is that when I click any month in the first dropdown , second dropdown normally shows all the dates from for loop as i have mentioned but when i again change the month say from feb to april the second dropdown show dates from 1 to 31 twice (may be 1 to 31 for first i slect month and 1 to 31 again for the second time when i select april). so to solve this i put the following statement Code: $("#mydropdown_for_day").remove(); Please help me where am i making msitake? remove() in jquery not working - El Forum - 07-24-2011 [eluser]toopay[/eluser] Its hard to guess without seeing your view structure. |