I
I
ikonavlg2015-12-29 16:44:27
JavaScript
ikonavlg, 2015-12-29 16:44:27

Magnific popup, how to correctly load data via ajax?

There is such a layout:

<a title="Name" class="thumbnail" href="/component/xxx?id=89">
   <img src="/images/file_5_9_485.jpg?0" alt="ALtName">            
  <div class="caption">
             <h2 class="product-name">Name</h2>
             <div class="price-block">
                     <p>Цена: <span class="price">10 р</span></p>
             </div>
             <div class="actions">
                    <button type="button" title="Добавить в корзину" class="btn to_cart">Купить</button>
                    <button type="button" title="Быстрый просмотр" data-href="/component/xxx?id=89" class=" quick-view">Быстрый просмотр</button>
             </div>
   </div>
</a>
... и т.д.

and there is such js
$('.thumbnail').magnificPopup({
        preloader: true,
        type: 'ajax',
        overflowY: 'scroll',
        gallery:{
            enabled:true
        }
    });

Now clicking on .thumbnail opens a magnific popup gallery.
Question:
How can I make the magnific popup gallery open only when button.quick-view is clicked, and when clicking on the .thumbnail link itself, just open the page in the browser?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew Ushchenko, 2015-12-29
@UAS_web

Why not just change js thumbnail to quick-view?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question