Skip to content

Instantly share code, notes, and snippets.

@dandydanny
Forked from dbc-challenges/lucky_ajax.md
Last active August 29, 2015 13:56
Show Gist options
  • Save dandydanny/9103253 to your computer and use it in GitHub Desktop.
Save dandydanny/9103253 to your computer and use it in GitHub Desktop.
@dandydanny
Copy link
Author

We changed application.js so that it intercepts submit button click, preventing the page from refreshing, generate a random die number, send die number via AJAX POST, and add image URL attribute of corresponding die inside the <img src=""> tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment