Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Event listener/AJAX example
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<a href="#" id="click_me">Click me</a>
<div id="response_holder">Nothing here!</div>
<script src="//"></script>
<script type="text/javascript" charset="utf-8">
$(document).on('ready', function (e) {
$('#click_me').on('click', function (e) {
url = "/";
method: 'get',
url: url,
data: {
aidan: 'cool',
mike: 'un-cool'
success: function (resp) {
error: function (xhr) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.