Answer the question
In order to leave comments, you need to log in
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
If you are using jQuery, then:
var $tip = $('#tip') // селектор подсказки
$('#button').click(function () {
$tip.toggle()
})
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 questionAsk a Question
731 491 924 answers to any question