Answer the question
In order to leave comments, you need to log in
Why doesn't the gallery work correctly in the Magnific Popup?
There is a one-page site proteks.h1n.ru , in the "Completed Works" block there are several works. When you click on each of them, 3 pictures of the object open and a description for it on the right. It is necessary to make it so that when you click on any of the three pictures, you can view them in a new popup window and, upon closing, return to the description of the object with three pictures.
In general, what problems arise:
1) An attempt to implement this was made on the first object when you click on a larger picture, but only the picture itself appears with the close button, when you click on the close button or on any area, the site itself opens, but you need to open the description and 3 pictures to it, i.e. the previous window.
2) The whole thing works only with the following call:
$('#test-popup').magnificPopup({
items:
{
src: 'img/portfolio/Altai-main.jpg',
type: 'image',
}
})
//For Mixitup
$("#portfolio_grid").mixItUp();
$(".objects li").click(function() {
$(".objects li").removeClass('active');
$(this).addClass('active');
});
$(".popup").magnificPopup({type:"image"});
$(".popup_content").magnificPopup(
{type: 'inline', midClick: true}
);
// Добавляем Id для ссылок и для каждого скрытого блока .port_descr
$(".portfolio_item").each(function(i) {
$(this).find("a").attr("href", "#work_" + i);
$(this).find(".port_descr").attr("id", "work_" + i);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question