Add append prepand JQuery

Add append and prepand in JQuery

$(document).ready(function(){
    $("#aaa").click(function(){
        $("p").append(" <b>Appended text</b>.");
    });

    $("#bbb").click(function(){
        $("ol").append("<li>Appended item</li>");
    });
});

Try it

Add prepend() Method in jQuery

$(document).ready(function(){
    $("#aaa").click(function(){
        $("p").prepend("<b>Prepended text</b>. ");
    });
    $("#bbb").click(function(){
        $("ol").prepend("<li>Prepended item</li>");
    });
});

Try it

Video Lecture

Prof.Fazal Rehman Shamil (Available for Professional Discussions)
1. Message on Facebook page for discussions,
2. Video lectures on Youtube
3. Email is only for Advertisement/business enquiries.