Mercurial > agora
comparison templates/snippet/snippet_details.js @ 149:cdfc1d269a75
Move syntax-highlighting JS to static/js/agora.js
I don't remember why I did this but I assume I had a reason
author | dellsystem <ilostwaldo@gmail.com> |
---|---|
date | Mon, 15 Oct 2012 00:24:16 -0400 |
parents | 3cd28df6f85b |
children |
comparison
equal
deleted
inserted
replaced
148:f876cc7b7270 | 149:cdfc1d269a75 |
---|---|
14 b: $("input[name=b]:checked").val() | 14 b: $("input[name=b]:checked").val() |
15 }, function(data){ | 15 }, function(data){ |
16 $('#diff').html(data).slideDown('fast'); | 16 $('#diff').html(data).slideDown('fast'); |
17 }); | 17 }); |
18 return false; | 18 return false; |
19 }); | |
20 | |
21 /** | |
22 * Changing syntax highlighting colours | |
23 */ | |
24 var currentStyle = $('#change-highlighting').attr('data-default'); | |
25 $('#change-highlighting').change(function () { | |
26 var newStyle = $(this).find(':selected').attr('data-name'); | |
27 | |
28 $('.snippet').removeClass(currentStyle).addClass(newStyle); | |
29 currentStyle = newStyle; | |
30 }); | 19 }); |
31 | 20 |
32 /** | 21 /** |
33 * Line Highlighting | 22 * Line Highlighting |
34 */ | 23 */ |