M
M
mortyyyyy2015-10-29 22:47:33
JavaScript
mortyyyyy, 2015-10-29 22:47:33

How are such widgets created?

For example, various calendars, datepickers, etc., when by clicking on an icon, an input field... a calendar or some other element appears in the same place. Is the element created and positioned relative to the element that fires the event, or is the element immediately in the right place and just hidden? And how to do it right, if you implement it yourself?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
twobomb, 2015-10-29
@mortyyyyy

You can position in different ways according to the coordinates of the mouse, you can click on the element, or maybe it was hidden there beforehand.
Here is an example https://jsfiddle.net/65Lxxa2n/1/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question