DOM elements : remove with jQuery
Hi, how are you all. I had just started to learn the Java. I don't have the basic knowledge of the Java. I would like to know about the jQuery. I would also like to know about the how can I use the jQuery to remove the DOM elements. Also I want to know how they can work in the program and how can I use them in the program. So, if anyone knows about the jQuery then reply me. I am waiting for your reply.
Re: DOM elements : remove with jQuery
Hi, I think the Javascript online library which is most famous is jQuery. On the internet lot of information and articles can be available about jQuery so I feel pointless that if I can describe it again. The most good parts of jQuery library is that jQuery amazingly handles the DOM elements. So, It can be good at that I usually use it with other JavaScript libraries. I hope it is enough for you to know what is the jQuery.
Re: DOM elements : remove with jQuery
The jQuery can be a javascript library that enables you to quickly develop animations, AJAX interactions and events. You have to note that the javascript files can go with XHTML file of the same that are related with each of the section. The jQuery can be a well thought powerful Javascript library that jQuery actually uses itself to build itself. What can I say to here is that many of the methods that can be provided by the jQuery library are built internally to the jQuery architecture as plugins.
Re: DOM elements : remove with jQuery
The remove() method of the jQuery library can takes elements out of the DOM. Whenever we would like to remove the element by itself and also everything in that method, We can use the remove() method. The jQuery data and all bound events related with the elements can be removed in addition to the element itself. The syntax of the remove() method can be as follows :
.remove( [ selector ] )
Re: DOM elements : remove with jQuery
The following program demonstrates you that All paragraphs from the DOM can be removed :
<!DOCTYPE html>
<html>
<head>
<style>p { background:black; margin:7px 0; }</style>
<script src="/scripts/jquery-1.4.js"></script>
</head>
<body>
<p>HELLO</p>
HOW ARE
<p>YOU?</p>
<button>CALL REMOVE() ON PARAGRAPH</button>
<script>
$("button").click(function () {
$("p").remove();
});
</script>
</body>
</html>