Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Option to hide anchor link, add data-sheethidden="true" argument to h…

…ide it.
  • Loading branch information...
commit dc252ed244c63f3b829b437b70277c0a65c95bde 1 parent 66f8d3c
Nelson Benitez authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 jquery.mobile.actionsheet.js
11 jquery.mobile.actionsheet.js
View
@@ -11,8 +11,13 @@
$.widget("mobile.actionsheet",$.mobile.widget,{
wallpaper: undefined,
content: undefined,
+ hidden: false,
_init: function() {
var self = this;
+ var hid = this.element.attr('data-sheethidden');
+ if (typeof(hid) != 'undefined' && hid.toLowerCase() == 'true') {
+ this.hidden = true;
+ }
this.content = ((typeof this.element.jqmData('sheet') !== 'undefined')
? $('#' + this.element.jqmData('sheet'))
: this.element.next('div'))
@@ -41,6 +46,12 @@
});
if( this.element.parents( ':jqmData(role="content")' ).length !== 0 ) {
this.element.buttonMarkup();
+ if (this.hidden) {
+ this.element.hide();
+ } else {
+ this.element.buttonMarkup();
+ }
+ }
}
},
open: function() {
Please sign in to comment.
Something went wrong with that request. Please try again.