B
B
busidoway2015-11-07 13:12:12
css
busidoway, 2015-11-07 13:12:12

How to make popup blocks under the button?

Good afternoon. How can I implement a popup block under the button? Let's say there are several buttons (or links) on the page, there is a hidden block. It is necessary that when you click on any button, this block pops up under the button. There were thoughts to make it as a tooltip.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Idel Gizatullin, 2015-11-07
@idelg

If you are using jQuery, then:

var $tip = $('#tip') // селектор подсказки

$('#button').click(function () {
  $tip.toggle()
})

B
busidoway, 2015-11-07
@busidoway

809a0f32bf1444b8a1896c68da4d3846.jpg
something like this

E
Eugene, 2015-11-09
@deworkers

on JQurey,
inside the .block block, we insert an absolutely positioned .hiddenBlock block, hiding it through css.

$(".button").click(function (){  /*обработка клика по кнопке*/
      $(this).parents(".block").find(".hiddenBlock").fadeIn(); /*ищем родителя элемента по которому кликнули, в родителе ищем скрытый блок и проявляем его */
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question