I have one question about ajax change text after success.

I have crated this ajax. This code working fine. But i want to change old text to new text in `.chnged` div.

For example: 

```
<input type="text" name="text" value="<?php echo $text;?>">
<input type="submit" id="change" value="Change Text">

```

the old text is = `<div class="chnged">Old text</div>`

when clicked `#change` button then = `<div class="chnged">New Text</div>`

how can i do that anyone can tell me ?

```
$('#change').click(function(e){
        e.preventDefault();
        $.ajax({
            type: "POST",
            url: $.base_url+'change_text.php',
            data: {text:$('input[name="text"]').val()},
            beforeSend: function(){$("#posting").html('<img src="icons/ajaxloader.gif"/>'); },
            success: function(html,data) {
            $('.chnged').val('');
            swal({   title: "Success!",   text: "Thanks.",   timer: 5000 });
            }
        });
      return false;
    });

```