Created
May 9, 2012 13:25
-
-
Save machuga/2644472 to your computer and use it in GitHub Desktop.
binding click event
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
$(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