Closed ruchiratrivedi closed 9 years ago
Make sure that placeholder is run after the AJAX return have rendered/been placed in the DOM.
Try this. It works for me
$.ajax().success(function (response) {
$(%YOUR_CONTENT%).find('input').placeholder();
});
@ruchiratrivedi you must recall the placeholder since it doesn't know about "future" DOM elements.
When I add the ajax response to a div on the page, the placeholder text does not show for the the textbox and textarea present in the ajax response. I have to refresh the page. I tried calling $('input, textarea').placeholder(); after ajax success. But it doesn't work.