views:

68

answers:

1

Hi,

Is there a way i can popup a dropdown menu on a webpage when i click on a text? I have a text that is highlighted. The text is highlighted using span tag. so now i have added a eventlistener - click and when i click i want to popup a dropdown menu on the text. I ahve tried by appending a div to the span and then adding the items as a list. But it doesnot show on the DOM and it doesnot even give me any error messages.

Is this even possible? Can someone help me with this please.

cheers

A: 

there is way to do it in javascript .for example popup for img tag

<img height="119" width="180" style="cursor: pointer;" oncontextmenu="return dm_popup(2, 2000, event);" onclick="return dm_popup(1, 2000, event);" src="data-samples/images/popup_pic.gif"/>

here the sample for your reference

Note:its not default feature in javascript.

Popups can be created without javascript using css only

Paniyar
hi can this be achieved on the clientside of the webpage. I am developing an extension. But somehow i cannot seem to get it working even with CSS.
fftoolbar