Skip to content

Instantly share code, notes, and snippets.

@doyle
Created March 6, 2023 14:36
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 doyle/162f6d72cfa8707a7e4c150d8bbe7f40 to your computer and use it in GitHub Desktop.
Save doyle/162f6d72cfa8707a7e4c150d8bbe7f40 to your computer and use it in GitHub Desktop.
Simulates the remote: true behavior in rails's links
$('.some-class').on('click', function(e){
e.preventDefault();
$.getScript($(this).attr('href'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment