diff options
author | franck cuny <franck@lumberjaph.net> | 2010-10-03 20:49:32 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-10-03 20:49:32 +0200 |
commit | 08a7e009d47d9e54a7f9da0be03fe8f2a153f9ad (patch) | |
tree | 0eb6a27bd8d4b5f4f3499572a23162043f09939b /public/js/common.js | |
parent | fix feed (diff) | |
download | jitterbug-08a7e009d47d9e54a7f9da0be03fe8f2a153f9ad.tar.gz |
move js to a file
Diffstat (limited to '')
-rw-r--r-- | public/js/common.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/public/js/common.js b/public/js/common.js new file mode 100644 index 0000000..646f80e --- /dev/null +++ b/public/js/common.js @@ -0,0 +1,15 @@ +$(document).ready(function() { + $('.builds-day').click(function() { + var day = $(this).text(); + var class = "#commits-day-" + day; + $(class).toggle(); + }); + $('.builds a').click(function() { + var url = $(this).attr("href"); + var id = $(this).parents('.commit').attr('id'); + $.getJSON(url, null, function(data) { + $("#result-" + id).html("<pre>" + data.content + "<pre>").toggle(); + }); + return false; + }) +}) |