Browse Source

Select chosen stylesheet on load

pull/40/head
Michael Foster 11 years ago
parent
commit
2fd60c6d25
  1. 11
      js/style-select.js

11
js/style-select.js

@ -19,11 +19,12 @@ onready(function(){
var i = 1;
stylesDiv.children().each(function() {
stylesSelect.append(
$('<option></option>')
.text(this.innerText.replace(/(^\[|\]$)/g, ''))
.val(i)
);
var opt = $('<option></option>')
.text(this.innerText.replace(/(^\[|\]$)/g, ''))
.val(i);
if ($(this).hasClass('selected'))
opt.attr('selected', true);
stylesSelect.append(opt);
$(this).attr('id', 'style-select-' + i);
i++;
});

Loading…
Cancel
Save