mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-09 00:50:58 +00:00
added option for fixedAs, which will allow for fixing a globalnav as header or footer
This commit is contained in:
parent
91ca456a82
commit
8d07b57b8a
1 changed files with 5 additions and 2 deletions
|
|
@ -7,9 +7,12 @@
|
|||
(function($){
|
||||
$.fn.globalnav = function(settings){
|
||||
return $(this).each(function(){ //there should only ever be one of these... is each necessary?
|
||||
|
||||
var o = $.extend({
|
||||
fixedAs: 'footer'
|
||||
},settings);
|
||||
|
||||
//wrap it with footer classes
|
||||
var globalnav = $(this).wrap('<div class="ui-footer ui-bar-a"></div>');
|
||||
var globalnav = $(this).wrap('<div class="ui-bar-a"></div>').addClass(o.fixedAs == 'footer' ? 'ui-footer' : 'ui-header');
|
||||
|
||||
//apply fixed footer markup to ui-footer
|
||||
$(document).fixHeaderFooter();
|
||||
|
|
|
|||
Loading…
Reference in a new issue