2 Replies - 852 Views - Last Post: 25 April 2011 - 09:37 PM

#1 lse123   User is offline

  • D.I.C Head

Reputation: -4
  • View blog
  • Posts: 82
  • Joined: 26-May 08

combobox to close must press in side the borders of the form

Posted 25 April 2011 - 04:52 AM

$(document.body).click(function(){
$('#dropdown_list').remove();
});


I make an auto-complete text box --- combo box (on focus appear drop down) but to close it either I must select an item, or press in side the borders of the form, if click outside [eg if the form is on the top then, if I click on bottom of page] drop down does not close, well?
Is This A Good Question/Topic? 0
  • +

Replies To: combobox to close must press in side the borders of the form

#2 xtremer360   User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 125
  • Joined: 03-March 11

Re: combobox to close must press in side the borders of the form

Posted 25 April 2011 - 08:28 PM

View Postlse123, on 25 April 2011 - 05:52 AM, said:

$(document.body).click(function(){
$('#dropdown_list').remove();
});


I make an auto-complete text box --- combo box (on focus appear drop down) but to close it either I must select an item, or press in side the borders of the form, if click outside [eg if the form is on the top then, if I click on bottom of page] drop down does not close, well?



I'm not jQuery expert but I'm thinking your looking for .hide instead of .remove.
Was This Post Helpful? 0
  • +
  • -

#3 rajesh.kakawat   User is offline

  • New D.I.C Head

Reputation: 5
  • View blog
  • Posts: 43
  • Joined: 03-January 11

Re: combobox to close must press in side the borders of the form

Posted 25 April 2011 - 09:37 PM

you could use hide method. if it could not solve then show some more code related to your problem
$(document.body).click(function(){
$('#dropdown_list').hide();
});



Was This Post Helpful? 0
  • +
  • -

Page 1 of 1