style = $(elm.container).offset();
w = elm.container.offsetWidth;
h = elm.container.offsetHeight;
style = $(elm.container).offset();
w = elm.container.offsetWidth;
h = elm.container.offsetHeight;
that.cont.show();
$(data.items).each(function(){
html = "<img src='{0}' height='16px' width='16px'>{1} ({2})".format(this.photo, this.name, this.nick)
that.cont.show();
$(data.items).each(function(){
html = "<img src='{0}' height='16px' width='16px'>{1} ({2})".format(this.photo, this.name, this.nick)
- if (event.keyCode == '13' && this.idsel>-1) {
- this.cont.children()[this.idsel].click();
- event.preventDefault();
+ if (event.keyCode == '13') {
+ if(this.idsel>-1) {
+ this.cont.children()[this.idsel].click();
+ event.preventDefault();
+ }
+ else
+ this.close();
this.cont.children().removeClass('selected');
$(this.cont.children()[this.idsel]).addClass('selected');
}
this.cont.children().removeClass('selected');
$(this.cont.children()[this.idsel]).addClass('selected');
}