Answer the question
In order to leave comments, you need to log in
What is the cause of error with fancyBox?
When several identical links are located on the page, the popup opening with inline content stops working correctly: it appears for a second and disappears, moreover, a darkened background remains. If there is only one link, then everything is ok.
Link:
<a data-fancybox="forms" data-src="#order-popup" href="javascript:;"></a>
$('[data-fancybox="forms"]').fancybox({
infobar: false,
touch: {
vertical: false,
momentum: false
}
});
<div class="order-popup hide" id="order-popup">
Содержимое
</div>
Answer the question
In order to leave comments, you need to log in
try it like this
$('[data-fancybox="forms"]').each(function(){
$(this).fancybox(...)
})
If the links require different galleries, then do not forget to indicate them.data-fancybox="forms-1"
data-fancybox="forms-2"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question