Try to search your question here, if you can't find : Ask Any Question Now ?

Remove parent div on button press

HomeCategory: stackoverflowRemove parent div on button press
Avatarpushpa asked 11 months ago

trying to create a dynamic button system to add/remove inputs on clicks. I have the addButton working but not the deleteButton. What am I missing?

$(document).ready(function() {
    var maxFields = 20;
    var addButton = $('#plusOne');
    var deleteButton = $('#minusOne');
    var wrapper = $('#userNumbers');
    var fieldInput = '<div><input type="text" name="persons" id="persons"/></div>';
    var x = 1;

    $(addButton).click(function () {
        if (x < maxFields) {

    $(deleteButton).click(function(e) {

<script src=""></script>
<button type="button" id="plusOne">+</button>
    <button type="button" id="minusOne">-</button>

    <div id="userNumbers">
        <input type="text" id="person" name="person">
2 Answers
Best Answer
AvatarFernando answered 11 months ago
AvatarTyroneArous answered 3 months ago

後宮情色線上影音網 – 中文有碼 中文無碼 番號搜索

Your Answer

2 + 9 =

Popular Tags

WP Facebook Auto Publish Powered By :