Skip to content

Instantly share code, notes, and snippets.

@machuga
Created May 9, 2012 13:25
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 machuga/2644472 to your computer and use it in GitHub Desktop.
Save machuga/2644472 to your computer and use it in GitHub Desktop.
binding click event
$(document).ready(function() {
$('.arrow').live('click', function(event) {
var ec = $('#events-container');
ec.fadeOut();
event.preventDefault();
var url = $(this).attr('href');
$.ajax({
url : url,
dataType : "html",
success : function(data) {
ec.html(data);
ec.fadeIn();
ec.html("Loading...").load("includes/get_events_ajax.php");
}
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment