I'm working on a mobile version of a website which allows the user to view either the navbar or the content area at any one time. I found and modified a jsfiddle to nearly do what I'd like...
Notice the 100% width, if you click the link and then open the nav again, it is much smaller (width: auto). This is due to this part of Twitter Bootstrap's Collapse javascript:
reset: function (size) {
var dimension = this.dimension()
this.$element
.removeClass('collapse')
[dimension](size || 'auto')
[0].offsetWidth
this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
return this
}
I assume I can swap out 'auto' for '100%', but that doesn't seem like an ideal solution. Anyone have a suggestion?