I have the following function which applies watermark text to any text box on the page with the id "Search"
:
jQuery(document).ready(function ($) {
$("#Search").watermark({
watermarkClass: 'watermarkOn',
defaultText: $("#Search").attr("watermarkText")
});
});
The problem I'm having is that that this doesn't get applied when I asynchronously load a panel that contains the text box, because it occurs in the jQuery(document).ready
function, which has already fired.
Is there anything I can do to make sure that any asynchronously loaded text boxes have this function applied to them? Thanks.