jquery:Empty div,span,p,remove inner content

jquery:Empty div,span,p,remove inner content – Php Code

jquery:Empty div,span,p,remove inner content – Php Code:Empty div,span,p using jquery,remove inner content of div,p,span.jquery empty method is used for remove inner containt of div or html tag.The jquery is client side scripting language which are run and load on browser.empty method work on like onclick onpageload, on hover and other jquery events.jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.Styles play a big part in the look and feel of any website, and jQuery can help us change them dynamically. In this section, we will look at how jQuery can be used to dynamically add and remove style classes and entire cascading style sheets

emptydivjquery

 

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("#empty").click(function(){
        $("#containt").empty();
    });
});
</script>
<div id="containt" style="height:100px;width:300px;border:1px solid black;background-color:yellow;">

This is some containt in the div.
<p>This is a paragraph containt.</p>


</div>
Share Button

About admin

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Author: pramod kumar kumawat Mob: 9269727062
Free WordPress Themes - Download High-quality Templates