Mercurial > agora
comparison templates/snippet/snippet_details.js @ 120:3cd28df6f85b
Rename <option> attr for pygments style select
From name to data-name, because <option>s don't have names.
For the validator.
author | dellsystem <ilostwaldo@gmail.com> |
---|---|
date | Fri, 14 Sep 2012 21:54:56 -0400 |
parents | 7d753658dc0e |
children | cdfc1d269a75 |
comparison
equal
deleted
inserted
replaced
119:2d5d80c0e967 | 120:3cd28df6f85b |
---|---|
21 /** | 21 /** |
22 * Changing syntax highlighting colours | 22 * Changing syntax highlighting colours |
23 */ | 23 */ |
24 var currentStyle = $('#change-highlighting').attr('data-default'); | 24 var currentStyle = $('#change-highlighting').attr('data-default'); |
25 $('#change-highlighting').change(function () { | 25 $('#change-highlighting').change(function () { |
26 var newStyle = $(this).find(':selected').attr('name'); | 26 var newStyle = $(this).find(':selected').attr('data-name'); |
27 | 27 |
28 $('.snippet').removeClass(currentStyle).addClass(newStyle); | 28 $('.snippet').removeClass(currentStyle).addClass(newStyle); |
29 currentStyle = newStyle; | 29 currentStyle = newStyle; |
30 }); | 30 }); |
31 | 31 |