Sunday, December 20, 2015

When button not click by Jquery OnClick function, try to add $(document).ready. see below

When button not click by Jquery OnClick function, try to

add  $(document).ready. see below

------------------------------------------------------------------------------------------------------------
 $(document).ready('#button').click(function(event){              
   //  Ensure that the SP.UserProfiles.js file is loaded before the custom code runs.
   // SP.SOD.executeOrDelayUntilScriptLoaded(getCurrentUser, 'SP.UserProfiles.js');
     getCurrentUser();

  });
----------------------------------------------------------------------------------------------------------

No comments:

Post a Comment