JQuery won't work until I refresh the webpage

david:
If the resources are included, a separate call like this will work (form onShow event probably):

plugins.WebClientUtils.executeClientSideJS('jQuery(function($){ $("#date").mask("99/99/9999",{placeholder:"dd/mm/yyyy"}); })')

If you wrap this in a function in the html:

'<html>\
<head>\
  <script src="http://twitter.github.io/typeahead.js/js/jquery-1.10.2.min.js"></script>\
  <script type="text/javascript" src="http://digitalbush.com/wp-content/uploads/2014/10/jquery.maskedinput.js"></script>\
  <script type="text/javascript" src=\'http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js\'></script>\
   <script>\
    function maskApply() {\
         jQuery(function($){\
           $("#date").mask("99/99/9999",{placeholder:"dd/mm/yyyy"});\
        });\
     }\
   </script>\
\ \ \ \ ' > ``` > > > > This this is how you trigger the client-side function: > > ``` > plugins.WebClientUtils.executeClientSideJS('maskApply()') > ```

You are a magician.
Thanks mate, the above is just slightly different from what I had but it made everything work like a charm. Phew, one down :)