Created
March 9, 2009 22:18
-
-
Save seivan/76518 to your computer and use it in GitHub Desktop.
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
// 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")} | |
// }) | |
$(function() { | |
$("a.rjs").click( function() { | |
alert("TEST"); | |
$.ajax({ | |
url: this.href + '.js', | |
dataType: "script", | |
beforeSend: function(xhr) {xhr.setRequestHeader("Accept", "text/javascript");} | |
}); | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment