Is there a way to make a message text slide in from right to left when clicking the submit button labeled as 'shoot'? The message will be displayed on the right side of the screen upon submission. How can this animation effect be achieved?
$('.submmit').click(function() {
var c = "<div class='movethis' class='width: 40px;height: 50px;position: absolute;right: 0;'>" + $(".mytxt").val() + "</div>";
$(".putbullet").append(c).animate({ "left": "0px" }, "slow");
$(".movethis").animate({ "left": "0px" }, "slow");
$(".movethis").css('right', '');
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div>
<input type="text" name="txt" class="mytxt">
<input type="button" class="submmit" value="Shoot">
</div>
<div class="areaofcontent" style="width:68%;float:right; background-color:#eee;height:400px;overflow-y:scroll;">
<div class="putbullet"></div>
</div>