Delete Input groups

How can I delete input groups from the page with jquery?

I have the following form that I want users to be able to click an "x" next to the group and delete the input group.
<form class="col-md-12 add-priv-co" action="submit.php" method="post" style="margin-top:20px;margin-bottom:20px;">

                        <label>Competitor Links</label>

                              <div class="form-group rssRow">
                                <div class="col-md-6 noPadLeft">
                                    <input class="form-control" name="title[]" placeholder="Competitor Name" required/>
                                <div class="col-md-6 noPadLeft">
                                    <input class="form-control facebookURL" name="link[]" placeholder="Link" required/>
                                <div class="clearfix"></div>

                        <input type="hidden" name="submitType" value="25"/>
                        <input type="hidden" name="userID" value="<?php echo $userID;?>"/>
                        <input type="hidden" name="orgID" value="<?php echo $orgID;?>"/>

                        <input type="button" class="btn loginBTN pull-right" id="add-row" name="add-row" value="ADD ROW" />
                        <button class="btn loginBTN">SAVE</button>
                            $('.add-priv-co').submit(function () {
                                var setFBurl = "";

                                // Get the Login Name value
                                var name = $('.facebookURL').val();

                                // trim it
                                name = $.trim(name);

                                //make it all lowercase
                                name = name.toLowerCase();

                                if (name.indexOf(setFBurl) < 0){
                                    setTimeout(function() { alert('Please enter a correctly formatted Facebook URL.'); }, 100);
                                    return false;


Open in new window

LVL 12
Nathan RileyFounderAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You could use a span like the one below (you will need to style it with CSS of course) or you could even use an <img/> tag.  But the what's of interest to you is the onclick handler shown below.
<div class="form-group rssRow">
<span onclick="this.parentNode.parentNode.removeChild(this.parentNode)">X</span>

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Nathan RileyFounderAuthor Commented:
Perfect, thanks!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.