JSFiddle - React, Tailwind, and code Playground
HTML
<textarea class="my_textarea" rows="1" type="text" placeholder="Reply to Joe..."></textarea>
<textarea class="my_textarea" rows="1" type="text" placeholder="Reply to Jane..."></textarea>
JavaScript
var placeholderValues = [];
function changePlaceholder() {
if( $(window).width() < 920 ){
$('.my_textarea').attr('placeholder','Reply test...');
} else {
$('.my_textarea').each(function(i){
$(this).attr('placeholder', placeholderValues[i]);
});
}
}
// initiate first
changePlaceholder();
//get values
$('.my_textarea').each(function(){
placeholderValues.push($(this).attr('placeholder'));
});
// resize
$(window).resize( changePlaceholder );