remove and add div jquery

remove and add div jquery

I want to enable my users to remove or add DIV using JQuery.

View Answers

December 28, 2013 at 11:11 AM

$('.add_more').click(function(){
    var description = $('#description').val();
    $newEl = $('<div class="description_text">'+description+' <a href="javascript:void(0);">X</a></div>');
    $newEl.on("click", function(){$(this).remove();});
    $(".append_data").append($newEl);
});

 $newEl.on("click", "a", function(){$(this).parent().remove();});

Ads









Related Tutorials/Questions & Answers:
remove and add div jquery
remove and add div jquery  I want to enable my users to remove or add DIV using JQuery.   $('.add_more').click(function(){ var description = $('#description').val(); $newEl = $('<div class="description_text
How to animate div with jQuery and JavaScript?
. In this tutorial we have learned to animate a div and add maximize effect using jQuery...Adding maximize effect to a div: How to animate div with jQuery... and create own animation. The animate() method of jQuery is used to add custom
Advertisements
How to animate div with jQuery and JavaScript?
. In this tutorial we have learned to animate a div and add maximize effect using jQuery...Adding maximize effect to a div: How to animate div with jQuery... and create own animation. The animate() method of jQuery is used to add custom
jQuery Toggle the Div
jQuery Toggle the Div       In this JQuery tutorial we will develop a program that toggle the content of a Div Steps to develop the Toggle of a Div . Step 1:       Create
Jquery Hide and Show Div
: Show/Hide Div in jQuery <!DOCTYPE html> <html> <head> <...Using jQuery effects one can perform lots of task such as Hide, Show, Toggle... and Hide methods in Java. .show() in jQuery is used to display the matched elements
How to add background image to div using CSS?
How to add background image to div using CSS
input using scanner and add/sub/mul/div of a matrix
input using scanner and add/sub/mul/div of a matrix  hiiii...... performe matrix add/sub/mul/div using scanner
Animate Div in Jquery
in jQuery. Animate Div in jQuery - jQuery .animate() Example  In jQuery...There are several jQuery methods that can be used for different purpose like jQuery .finish(), .queue(), .show(), .slideDown(), .slideUp(), .stop
How to add google page in my webpage using jquery ajax.
How to add google page in my webpage using jquery ajax.  Hi, I created a page index.html on desktop . this page content following code. <html>...); } }); }); </script> </html> <body> <div id="middle"> <
Add and Remove Tab to a JTabbedPane Container
Add and Remove Tab to a JTabbedPane Container  ...: This section shows you how to add a tab to the JTabbedPane container and how to remove tab from a JTabbedPane container.  In this section, you will learn
is it possible to add a button inside an autocomplete jquery ui plugin?
is it possible to add a button inside an autocomplete jquery ui plugin?  is it possible to add a button inside an autocomplete jquery ui plugin? My... a button that will open a jquery modal form, that the user can enter the desired data
how to dynamically add text boxes with add and remove link based on drop down choices, if a particular choice is selected.
how to dynamically add text boxes with add and remove link based on drop down choices, if a particular choice is selected.  how to dynamically add text boxes with add and remove link based on drop down choices, if a particular
JQuery
JQuery  how to use jquery
Jquery
Jquery  I am new to Jquery. Can anyone please tell me how to use jquery plugins in html
Add/Remove Rows Dynamically with drop down list in html table using php
Add/Remove Rows Dynamically with drop down list in html table using php ... the following link: JSP Add Remove row using Javascript...;th>Name</th> <th>Add Field</th> <
jquery
jquery  What are the Jquery similarities or difference with other java script libraries
JQuery
JQuery  How i begin JQuery and where i begin learning?   Please visit the following link: JQuery Tutorials Learn Jquery from the above link. Here you will get lot of examples with illustration
jQuery
jQuery  Hi, What is jQuery and how it is used to develop Web applications? Thanks
jquery
jquery  how to display the leaves taken or holidays of the year or half working days in a calendar in some colors to identify the days using jquery plugin
JQuery
JQuery  how to create jquery auto-complete textbox ? in which data come from database table?   Please visit the following link: http://www.roseindia.net/tutorial/jquery/autoSuggestTextbox.html   thank you
write a program to create an arraylist with string(add,remove) operation.and value should be enter through keyboard.
write a program to create an arraylist with string(add,remove) operation.and value should be enter through keyboard.  write a program to create an arraylist with string(add,remove) operation.and value should be enter through
write a program to create an vector with string(add,remove) operation.and value should be enter through keyboard.
write a program to create an vector with string(add,remove) operation.and value should be enter through keyboard.  write a program to create an vector with string(add,remove) operation.and value should be enter through keyboard
write a program to create an arraylist with string(add,remove) operation.and value should be enter through keyboard.
write a program to create an arraylist with string(add,remove) operation.and value should be enter through keyboard.  write a program to create an arraylist with string(add,remove) operation.and value should be enter through
JQuery
, use jquery autocomplete
JQuery
using url of the doctors, use jquery autocomplete
jQuery - jQuery Tutorials and examples
   jQuery Toggle the Div In this JQuery tutorial we will develop a program that toggle the content of a Div   jQuery...;.    jQuery To Hide the Div In this JQuery tutorial we
div style background
div style background  How to add background color to a div? What is the code of div style background?   Hi, You can use the following code: <div style="background-color: #ccffcc;"> <p>Content</p> <
add
Java Example to add two numbers  Java Example to add two numbers  Here is a java example that accepts two integer from the user and find their sum. import java.util.*; class AddNumbers { public static void main
add
add two no in Java  Java Add Example that accepts two integer from the user and find their sum  Here is a java example that accepts two integer from the user and find their sum. import java.util.*; class AddNumbers
add
How to add two int numbers in Java Example  How to add two int numbers in Java Example  Here is a java example that accepts two integer from the user and find their sum. import java.util.*; class AddNumbers
add
Java Program to add two numbers  Java Program to add two numbers  Here is a java example that accepts two integer from the user and find their sum. import java.util.*; class AddNumbers { public static void main

Ads