Created
September 22, 2010 19:47
-
-
Save jordanandree/592394 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a class="comments" rel="123" href="http://url-to-real-comments-page.com">View Comments</a> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($){ | |
$('.comments').click(function(){ | |
$.ajax({ | |
type: 'get', | |
data: { id: $(this).attr('rel')}, | |
url: 'URL HERE', // link to the ajax request file | |
success: function( response ){ | |
$.fancybox( response ); | |
} | |
}) | |
// this is needed to prevent the link from loading the HREF | |
return false | |
}) | |
}) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment