Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi friends,

Thanks for your time,

i need help, now im creating div(with controls) dynamically, and also i have remove option for that, so im creating dynamically remove option(just link) also.

now i want to check condition like, user cannot remove every div,limit is 3 times, and also need to set alert message if they reach limit. pls find below my code

html
=====
XML
<div class="span3" style="margin-top:270px"><a href="#x" id="removelink">Remove</a></div>


javascript
===========
JavaScript
<script type="text/javascript">
$(".form-horizontal").delegate("#removelink", "click", function () {
	$(this).closest('.optiondiv').hide('slow', function(){ 
		$(this).remove(); 
		resequence();
		});	
	});
</script>


pls help me to solve this problem.

thanks :)
Posted
Comments
Sergey Alexandrovich Kryukov 23-Sep-14 23:49pm    
And what the problem than? This is Javascript, programming language. Add any conditions you like. What is unclear?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900