Replace string using jQuery

Category > JQUERY || Published on : Monday, June 22, 2015 || Views: 3825 || Replace string using jQuery Replace string Replace string using jQuery tutorial

In this tutorial we are going to learn to replace string using jquery so for this simple create a HTML page with the following codes.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
    <script src="" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $(".element span,p").text(function (index, text) {
                return text.replace('Hello', 'SourceCodehub');

    <div class="element">

so In this tutorial we have learn to replace string using jquery. Happy Coding!!!!