sample_textlink.html 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link rel="stylesheet" href="../../../themes/themeroller/default-theme/ui.all.css" type="text/css" media="screen" />
  5. <link rel="stylesheet" href="../../../themes/nokia/ext-theme/default/360x640/custom.css" type="text/css" media="screen" />
  6. <script src="../../../lib/jquery/jquery.js" type="text/javascript" charset="utf-8"></script>
  7. <script src="../../../src/defaults.js" type="text/javascript" charset="utf-8"></script>
  8. <script src="../../../src/core.js" type="text/javascript" charset="utf-8"></script>
  9. <style type="text/css" media="screen">
  10. body {
  11. font-size: 14px;
  12. padding: 15px;
  13. font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
  14. }
  15. p {
  16. margin: 30px 10px;
  17. }
  18. #link01 {
  19. /* Style */
  20. }
  21. </style>
  22. </head>
  23. <body>
  24. <br/><br/><br/><br/>
  25. <a href="#" id="link01">Link 01</a>
  26. <br /><br />
  27. <a href="#" id="link02">External web page</a>
  28. <br /><br />
  29. <script type="text/javascript" charset="utf-8">
  30. if (window.widget) {
  31. widget.setNavigationEnabled(false);
  32. }
  33. var init = function() {
  34. window.link1 = new Nokia.TextLink({
  35. element: '#link01',
  36. label: 'Callback',
  37. style: {
  38. color: 'red',
  39. fontSize: '15px'
  40. },
  41. create: function() {
  42. console.log("TextLink: Create");
  43. },
  44. click: function() {
  45. alert('TextLink: Click');
  46. }
  47. });
  48. window.link2 = new Nokia.TextLink({
  49. element: '#link02',
  50. url: 'http://www.forum.nokia.com/',
  51. label: '<b>Testing</b> Label.',
  52. style: {
  53. color: 'green',
  54. fontSize: '25px'
  55. },
  56. click: function() {
  57. console.log("TextLink: Click");
  58. }
  59. });
  60. /*
  61. * Hide splash when its all done.
  62. */
  63. Nokia.hideSplash();
  64. };
  65. /*
  66. * Show splash while loading components.
  67. */
  68. Nokia.showSplash('<span>loading</span>');
  69. Nokia.use('textlink', init);
  70. </script>
  71. </body>
  72. </html>