Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.04 KB | None | 0 0
  1. <div id="announcements">
  2. <div id="slider1_container" class="announcements">
  3. <!-- Slides Container -->
  4. <div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: 725px; height: 345px; overflow: hidden;">
  5. <!-- Slide -->
  6. <div>
  7. <img id="annimgone" u="image" src="https://team.gsk.com/sites/chna-aar/SiteAssets/slide1.jpg" />
  8. <div u="caption" t="MCLIP|B" style="position: absolute; top: 295px; left: 0px; width: 725px; height: 50px;">
  9. <div style="position: absolute; top: 0px; left: 0px; width: 725px; height: 50px;
  10. background-color: Black; opacity: 0.5; filter: alpha(opacity=50);">
  11. </div>
  12. <div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 50px;
  13. color: White; font-size: 16px; font-weight: bold; line-height: 50px; text-align: center;">
  14. <a class="white" style="color:white;" href="#" id="annone">The Change Network</a>
  15. </div>
  16. </div>
  17. </div>
  18. <!-- Slide -->
  19. <div>
  20. <img id="annimgtwo" u="image" src="https://team.gsk.com/sites/chna-aar/SiteAssets/slide2.jpg" />
  21. <div u="caption" t="MCLIP|B" style="position: absolute; top: 295px; left: 0px; width: 725px; height: 50px; ">
  22. <div style="position: absolute; top: 0px; left: 0px; width: 725px; height: 50px;
  23. background-color: Black; opacity: 0.5; filter: alpha(opacity=50);">
  24. </div>
  25. <div style="position: absolute; top: 0px; left: 0px; width: 725px; height: 50px;
  26. color: White; font-size: 16px; font-weight: bold; line-height: 50px; text-align: center;">
  27. <a class="white" style="color:white;" href="#" id="anntwo">Express Learning</a>
  28. </div>
  29. </div>
  30. </div>
  31. <!-- Slide -->
  32. <div>
  33. <img id="annimgthree" u="image" src="https://team.gsk.com/sites/chna-aar/SiteAssets/slide3.jpg" />
  34. <div u="caption" t="MCLIP|B" style="position: absolute; top: 295px; left: 0px; width: 725px; height: 50px; ">
  35. <div style="position: absolute; top: 0px; left: 0px; width: 725px; height: 50px; background-color: Black; opacity: 0.5; filter: alpha(opacity=50);">
  36. </div>
  37. <div style="position: absolute; top: 0px; left: 0px; width: 725px; height: 50px; color: White; font-size: 16px; font-weight: bold; line-height: 50px; text-align: center;">
  38. <a class="white" style="color:white;" href="#" id="annthree">Opport-Tuesdays</a>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. <a style="display: none" href="http://www.jssor.com">javascript carousel</a>
  44. </div>
  45. <script type="text/javascript">
  46. $(document).ready(function () {
  47. var siteURL = '/sites/chna-aar/'
  48.  
  49. var clientContext = new SP.ClientContext(siteURL);
  50. var site = clientContext.get_web();
  51. var list = site.get_lists().getByTitle('Announcements');
  52.  
  53. var query = '<Query><Where><IsNotNull><FieldRef Name="Title" /></IsNotNull></Where><OrderBy><FieldRef Name="Created" Ascending="False" /></OrderBy></Query>'
  54.  
  55. var camlQuery = new SP.CamlQuery();
  56. camlQuery.set_viewXml(query);
  57.  
  58. var items = list.getItems(camlQuery);
  59.  
  60. clientContext.load(items);
  61.  
  62. clientContext.executeQueryAsync(function () {
  63. var enumerator = items.getEnumerator();
  64.  
  65. while (enumerator.moveNext()) {
  66. var item = enumerator.get_current();
  67. var title = '';
  68. title = item.get_item('Title');
  69.  
  70. $("#annone").text(title);
  71. //Alternative - $("#annone").html(title);
  72. }
  73. }, function () { });
  74. });
  75. </script>
  76. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement