Skip to content

Instantly share code, notes, and snippets.

@MiLk
Created October 4, 2011 08:26
Show Gist options
  • Save MiLk/1261151 to your computer and use it in GitHub Desktop.
Save MiLk/1261151 to your computer and use it in GitHub Desktop.
<a href="javascript:;" rel="1" class="ajax_link">Text</a>
$(document).ready(function() {
$(".ajax_link").click(function(){
var id = $(this).attr('rel');
$.get('page.php?id='+id, function(data) {
$('#content').html(data);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment