Jump to content

Recommended Posts

Hi i have a textarea. Text area is to enter label names. When i enter first letter of the label name the matching labels appear as dropdown so that they can select the label from the drop down instead of typing the whole name. This drop down is a div.


Now i need to hide the div when i click elsewhere on the document except on the dropdown. how can i achieve this?


I tried with onblur on the textarea but there is a pronblem with that. the problem is when drop down appears there will be list of tags in the drop down. now i have to capture the clicked tag from drop down but as onblur is geting fired the drop down is getting hiden and onclick event on the labels is not working. In the drop down every label is a div.


Thanks in advance for helping?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...