How can I run some JavaScript after my display template has loaded. I have tried:
AddPostRenderCallback(ctx, function () {
jQuery(document).ready(function () {
alert(jQuery('.ms-srch-hover-subTitle').text());
});
})
but that doesn't work. .ms-srch-hover-subTitle
is getting added from the display template. so I want the display template to be put on screen and then for the js to run