I have a div in which i have a tag which toggles (by adding or removing class) another div below it.
<div class="outer">
<input type="text" name="fname[]">
<input type="text" name="lname[]">
<a href="javascript://" class="adv_settings_link">+ Advance Settings</a>
<div class="inner_div">
<input type="text" name="city[]">
<input type="text" name="phone[]">
</div>
<a href="javascript://" class="clone_link">+ Add Another</a>
</div>
And then at the bottom of the page I have this javascript code:
<script>
$(".adv_settings_link").click(function(){
$(this).closest('.inner_div').hide();
});
</script>
But in the cloned divs the Advance Setting link is not working and keeps on toggling the first original div only.
I’ve been trying different things but it’s simply not working for cloned divs.
Thanks in advance.