Skip to content

Instantly share code, notes, and snippets.

@wegorich
Created May 13, 2013 14:33
Show Gist options
  • Save wegorich/5568727 to your computer and use it in GitHub Desktop.
Save wegorich/5568727 to your computer and use it in GitHub Desktop.
fancybox load html contet
$ ->
$(document).on('click', '.fancybox', (e)->
$.fancybox.showLoading()
$.ajax
url: $(this).attr('href') + type,
success: (data)->
$.fancybox.hideLoading()
$.fancybox(data, {
overlay :
locked : true
})
$('.modal .btn-close').click ->
$.fancybox.close();
dataType: 'html'
e.preventDefault()
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment