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 1 year 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">
3 Answers
Best Answer
AvatarFernando answered 1 year ago
AvatarTyroneArous answered 5 months ago

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

AvatarMichaelgag answered 1 month ago

Pest Control | Exterminators | Pest Control Service
[url=]Show more>>>[/url]

Your Answer

14 + 8 =

Popular Tags

WP Facebook Auto Publish Powered By :