$('textarea').on('input propertychange', function () {
$('textarea').urlive({
callbacks: {
onStart: function () {
$('.loading').show();
$('.urlive-container').urlive('remove');
},
onSuccess: function (data) {
$('.loading').hide();
},
noData: function () {
$('.loading').hide();
}
}
});
});
<textarea placeholder="input a URL here"></textarea>
<div class="urlive-container">
<span class="loading">Loading...</span>
</div>
* {
font-family:'Segoe UI', 'Open Sans', sans-serif;
}
textarea {
width:450px;
height:70px;
}
.urlive-container {
margin-top:15px;
width:450px;
}
.loading {
display:none;
}
External resources loaded into this fiddle: