改进标签自动完成宽度计算方式

This commit is contained in:
fen 2013-10-13 18:18:59 +08:00
parent e4dcdc0492
commit 8b5dfb9fba
2 changed files with 6 additions and 4 deletions

View File

@ -2074,7 +2074,7 @@ li.token-input-token {
padding: 0 6px;
height: 24px;
line-height: 24px;
background-color: #E9E9E6;
background-color: #F3F3F0;
cursor: default;
font-size: .92857em;
white-space: nowrap;
@ -2093,8 +2093,7 @@ li.token-input-token span {
}
li.token-input-selected-token {
background-color: #467B96;
color: #FFF;
background-color: #E9E9E6;
}
li.token-input-input-token {

View File

@ -27,7 +27,10 @@ $(document).ready(function() {
// tag autocomplete 提示
$("#tags").tokenInput("http://shell.loopj.com/tokeninput/tvshows.php");
// tag autocomplete 提示宽度设置
$(".token-input-dropdown").width($(".token-input-list").css('width'));
$("#token-input-tags").focus(function() {
$(".token-input-dropdown").width($(".token-input-list").css('width'));
});
});
</script>