Loading dynamic AJAX content into Fancybox

前端 未结 9 1423
夕颜
夕颜 2020-12-17 22:47

This scenario:

The user inserts his zip into an input-field, and when clicking the magic button, he gets to see stores closest to his location. I ca

9条回答
  •  死守一世寂寞
    2020-12-17 23:45

    I know this is an old question, but I've recently had to deal with something similar. Here is what I did to load ajax into fancybox.

    $('#button').on('click', function(){
        $.fancybox({
            width: 400,
            height: 400,
            autoSize: false,
            href: '/some/url-to-load',
            type: 'ajax'
        });
    });
    

提交回复
热议问题