jQuery after Method
jQuery after method : is used to add new html element(content) after the selected element ie. after outside of the element.
Syntax
$(selector).after('some......content');
jQuery after Method Example
jQuery after() Method with syntax
<script type="text/javascript"> $(document).ready(function(){ $( "#beforeExample" ).on( "click", function(event) { $("div").after("<h3>After text.......</h3>"); }); }); </script> |
Advertisements