/
application.js
30 lines (28 loc) · 1 KB
/
application.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require jquery
//= require jquery_ujs
//= require_tree .
// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
$(document).ready(function () {
//Content grid/table switching
$('a.update_holder').live('click', function(event){
event.preventDefault();
target_url = $(this).attr('href')
$.ajax({
url: target_url,
dataType: "html",
cache: false,
success: function(data) {
$("#content_holder").fadeOut(100, function(){
$("#content_holder").html("").html(data).fadeIn('slow')
});
}
});
});
});