source: trunk/www.guidonia.net/wp/wp-content/themes/carrington-mobile-1.0.2/js/mobile.js@ 44

Last change on this file since 44 was 44, checked in by luciano, 14 years ago
File size: 1.5 KB
Line 
1// This file is part of the Carrington Mobile Theme for WordPress
2// http://carringtontheme.com
3//
4// Copyright (c) 2008-2009 Crowd Favorite, Ltd. All rights reserved.
5// http://crowdfavorite.com
6//
7// Released under the GPL license
8// http://www.opensource.org/licenses/gpl-license.php
9//
10// **********************************************************************
11// This program is distributed in the hope that it will be useful, but
12// WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14// **********************************************************************
15
16jQuery(function($) {
17 $('div.tabbed').prepend('<ul class="tabs hide"><li class="active"><a href="#recent">' + CFMOBI_POSTS_TAB + '</a></li><li><a href="#pages">' + CFMOBI_PAGES_TAB + '</a></li></ul>');
18 var tabs = $('ul.tabs');
19 if (tabs.size()) {
20 tabs.removeClass('hide');
21 $('#recent, #pages').hide();
22 $('ul.tabs a[href=#recent]').click(function() {
23 $('ul.tabs li').removeClass('active');
24 $(this).parent().addClass('active');
25 $('#pages_tab').hide();
26 $('#recent_tab').show();
27 return false;
28 });
29 $('ul.tabs a[href=#pages]').click(function() {
30 $('ul.tabs li').removeClass('active');
31 $(this).parent().addClass('active');
32 $('#recent_tab').hide();
33 $('#pages_tab').show();
34 return false;
35 });
36 if (CFMOBI_IS_PAGE) {
37 $('ul.tabs a[href=#pages]').click();
38 }
39 else {
40 $('ul.tabs a[href=#recent]').click();
41 }
42 $('.tabbed ul.group').css({
43 'border-top': '0',
44 'margin-top': '0'
45 });
46 }
47});
Note: See TracBrowser for help on using the repository browser.