alexboev

Untitled

Oct 2nd, 2013
491
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type='text/javascript'>
  2. function InitCallout()
  3. {
  4. var launchPoint = document.getElementById('launchPoint');
  5. var calloutOptions = new CalloutOptions();
  6. calloutOptions.ID = 'calloutID';
  7. calloutOptions.launchPoint = launchPoint;
  8. calloutOptions.beakOrientation = 'leftRight';
  9. calloutOptions.content = 'content';
  10. calloutOptions.title = 'title';
  11.  
  12. // call the CalloutManager to create the callout
  13. var callout = CalloutManager.createNew(calloutOptions);
  14.  
  15. // subscribe to the 'opening' event. There's also 'opened', 'closing' and 'closed' events
  16. // calloutObject param is the same callout
  17. callout.addEventCallback('opening', function(calloutObject){
  18.     // we need to work with this specific element because there are additional markup
  19.     //for title and for close button and we don't want to break it
  20.     var contentWrapperId = 'co' + calloutObject.getID() + '_callout-body';
  21.     document.getElementById(contentWrapperId).innerHTML = '<div>' + new Date().toString() + '</div>';
  22. });
  23.  
  24. }
  25.  
  26. _spBodyOnLoadFunctionNames.push('InitCallout');
  27. </script>
  28. <div id='launchPoint' style='width: 100px;'>Launch point</div>
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×