Skip to content

Instantly share code, notes, and snippets.

@seivan
Created March 9, 2009 21:36
Show Gist options
  • Save seivan/76493 to your computer and use it in GitHub Desktop.
Save seivan/76493 to your computer and use it in GitHub Desktop.
// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
JQuery.ajaxSetup({
'beforeSend' function(xhr) {xhr.setRequestHeader("Accept", "text/javascript")}
})
$(document).ready(function() {
$(function() {
$("a.rjs").click( function() {
alert("TEST");
$.ajax({
url: this.href,
dataType: "script"});
};)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment