Re: Please help with tabBar

0 views
Skip to first unread message

Giraldo Rosales

unread,
Aug 18, 2009, 11:01:42 AM8/18/09
to Juriy Salmin, liqui...@googlegroups.com
Fixed the JS code as well as added Yoann's switchTo script as "lg.page.open". You will need to update the JS files from the SVN. Then try this index.html,

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
<meta name="viewport" content="width=320; user-scalable=no" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>LiquidGear</title>
<link rel="stylesheet" href="css/styles.css" type="text/css" media="screen" charset="utf-8">
  <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
  <script type="text/javascript" charset="utf-8" src="js/lg_iphone.js"></script>
  <script type="text/javascript" charset="utf-8" src="js/lg_iphone_ui.js"></script>
  <script type="text/javascript">
//This will call your init function when everything is loaded
lg.bind('lg_init', initTabs);

function initTabs() { 
lg.tabs.add({btn:1, title:'Home', icon:'btn1.png', callback:'gotoInfo()'}); 
lg.tabs.add({btn:2, title:'Files', icon:'btn2.png', callback:'gotoContacts()'}); 
lg.tabs.show(); 
}

function gotoInfo() {
lg.page.open('info'); // I'd like someting like that... 

function gotoContacts() { 
lg.page.open('contacts'); // I'd like someting like that... 
}
</script>
</head>


<body id="stage">
<div class="page" type="html" id="home" url="home.html" title="LiquidGear" desc="Welcome to LG" navigation="true" selected="true"></div>
  <div class="page" type="html" id="info" url="info.html" title="Info" desc="Device information" callback="setInfo" navigation="true"></div>
</body>

</html>

-G

iHello

unread,
Aug 18, 2009, 4:19:15 PM8/18/09
to LiquidGear
Thank you! It works.

On Aug 18, 6:01 pm, Giraldo Rosales <nitr...@gmail.com> wrote:
> Fixed the JS code as well as added Yoann's switchTo script as  
> "lg.page.open". You will need to update the JS files from the SVN.  
> Then try this index.html,
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd
> ">
>
> <html>
> <head>
> <meta name="viewport" content="width=320; user-scalable=no" />
> <meta http-equiv="Content-type" content="text/html; charset=utf-8">
> <title>LiquidGear</title>
> <link rel="stylesheet" href="css/styles.css" type="text/css"  
> media="screen" charset="utf-8">
>    <script type="text/javascript" charset="utf-8" src="js/jquery.js"></
> script>
>    <script type="text/javascript" charset="utf-8" src="js/
> lg_iphone.js"></script>
>    <script type="text/javascript" charset="utf-8" src="js/

Yoann

unread,
Aug 19, 2009, 3:14:37 PM8/19/09
to LiquidGear
cool! ;)

Yo
Reply all
Reply to author
Forward
0 new messages