Created
August 19, 2015 21:59
-
-
Save alfredobarron/ee219114977c398f8cef to your computer and use it in GitHub Desktop.
width 100% in bootstrap 3 into tabs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Change line 4927 | |
*/ | |
Select2.prototype._resolveWidth = function ($element, method) { | |
var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i; | |
if (method == 'resolve') { | |
var styleWidth = this._resolveWidth($element, 'style'); | |
if (styleWidth != null) { | |
return styleWidth; | |
} | |
return this._resolveWidth($element, 'element'); | |
} | |
if (method == 'element') { | |
var elementWidth = $element.outerWidth(false); | |
if (elementWidth <= 0) { | |
return 'auto'; | |
} | |
//return elementWidth + 'px'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment