Guest User

Untitled

a guest
Jul 21st, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1.  
  2. /**
  3. * Initialize Phonegap and jQTouch
  4. */
  5.  
  6. PhoneGap.addConstructor(function () {
  7. setupToolbars();
  8. });
  9.  
  10. $(document).ready(function () {
  11. // put here jquery stuff
  12. });
  13.  
  14. jQT = $.jQTouch({
  15. icon: 'jqtouch.png',
  16. statusBar: 'black',
  17. preloadImages: [
  18. 'apple/jqt/img/chevron_white.png',
  19. 'apple/jqt/img/bg_row_select.gif',
  20. 'apple/jqt/img/back_button_clicked.png',
  21. 'apple/jqt/img/button_clicked.png'
  22. ]
  23. });
  24.  
  25.  
  26.  
  27.  
  28. function setupToolbars() {
  29. var standardTabSelectCallback;
  30.  
  31. try {
  32. window.uicontrols.createTabBar();
  33. } catch (e) {
  34. alert(e.message);
  35. }
  36.  
  37. window.uicontrols.createTabBarItem("Start", "Start", "start.png", {
  38. onSelect: function () {
  39. standardTabSelectCallback("Einstellungen");
  40. }
  41. });
  42.  
  43. window.uicontrols.createTabBarItem("Info", "Info", "info.png", {
  44. onSelect: function () {
  45. standardTabSelectCallback("Info");
  46. }
  47. });
  48.  
  49. standardTabSelectCallback = function (tab) {
  50. if (selectedTab === tab) {
  51. return;
  52. } else {
  53. jQT.goTo('#' + tab, 'flip');
  54. selectedTab = tab;
  55. }
  56. };
  57.  
  58. window.uicontrols.showTabBar();
  59. window.uicontrols.showTabBarItems("Fahrplan", "Einstellungen", "Info");
  60. window.uicontrols.selectTabBarItem("Fahrplan");
  61. }
Add Comment
Please, Sign In to add comment