Answer the question
In order to leave comments, you need to log in
How to load only certain div in magnific popup in ajax request?
There is such a window plugin.
I want to call a window and load content into it starting from a certain div on the Internet they write about some kind of ?tmpl=component
<a class="simple-ajax-popup" href="https://vipadmin.club/o-proekte.html?tmpl=component">Загрузить страницу в мод. окне Ajax</a>
Answer the question
In order to leave comments, you need to log in
Do you have Joomla? It looks like ?tmpl=component is related to this CMS, and somehow formats the output of CMS information, which can later be used for a popup window, as an option.
It seems to be written here:
https://boxapp.net/blog/joomla/ispolzovanie-tmpl-c...
PS For Magento, ?tmpl=component is not relevant at all.
If you need to load some div on the site into the popup window, use the standard config https://dimsemenov.com/plugins/magnific-popup/docu...
Load a specific element from another page:
We use callback in the call:
$('.open-popup-link').magnificPopup({
type:'ajax',
callbacks: {
parseAjax: function(mfpResponse) {
mfpResponse.data = $(mfpResponse.data).find('#какой-то элемент');
}
}
});
$('.open-popup-link').magnificPopup({
type:'ajax',
callbacks: {
parseAjax: function(mfpResponse) {
mfpResponse.data = $(mfpResponse.data).filter('#какой-то элемент');
}
}
});
tmpl=component
- this is a feature of Joomla and has nothing to do with the pop-up plugin. The fact is that when passing this parameter to Joomla, the CMS will issue only the content part without the rest of the blocks - more here.
Accordingly, this will not work for you (unless you have Joomla). A different approach is needed here. For example, as an option, starting from the popup path (based on the popup selector, so that it would not affect the main site) hide / remove unnecessary elements (header, footer) or create pages separately without a header and footer
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question