Skip to content

Instantly share code, notes, and snippets.

@rounders
Created September 6, 2012 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rounders/3649418 to your computer and use it in GitHub Desktop.
Save rounders/3649418 to your computer and use it in GitHub Desktop.
load url via ajax, extract only the content you need and display in a fancybox
$('a.some_class').bind 'click', (e) ->
e.preventDefault();
$.get $(this).attr('href'), (data) ->
$.fancybox
content: $(data).find('#main_content_wrapper')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment