]> asedeno.scripts.mit.edu Git - bluechips.git/blob - bluechips/public/js/mobile.js
more refinements to the iphone targeted interface, improved validation functionality...
[bluechips.git] / bluechips / public / js / mobile.js
1 try {
2     console.log("init");
3 } catch(e) {
4     console = { log: function() {} };
5 }
6
7 $(function() {
8     console.log("ready()");
9
10     $('#tabs a').click(function() {
11         $('#tabs a').removeClass('selected');
12         $(this).addClass('selected');
13         $('div.tab').hide();
14
15         /* See if that tab has been rendered to the page. */
16         tabname = '#tab-' + $(this).attr('id');
17         tab = $(tabname);
18         if(tab.children().length < 1) {
19             /* If not, return true so that we actually reload. */
20             tab.load($(this).attr('href') + ' ' + tabname + '> *');
21         }
22         tab.show();
23         return false;
24     });
25     $('#tabs a.selected').click();
26
27     console.log("ready() done");
28 });
29