2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-08 14:20:59 +00:00

add css 'right' option,working when 'width' option value equal 'auto'

This commit is contained in:
jiangbaojun 2018-03-20 11:30:55 +08:00
parent 75a8ae9038
commit 5707c9f2bf

View File

@ -347,7 +347,11 @@
if (that.options.width === 'auto') {
styles.width = that.el.outerWidth() + 'px';
}
// add css "right" option,working when "width" option value equal "auto"
if(that.options.right && that.options.width === 'auto'){
styles.width = "";
styles.right = that.options.right+"px";
}
$container.css(styles);
},