【发布时间】:2020-12-20 21:38:39
【问题描述】:
我正在使用一个名为 vextab 的 javascript 包。 https://github.com/0xfe/vextab 该软件包使在 javascript 中创建吉他标签变得容易。 参考这个jsfiddle:https://jsfiddle.net/hy8efjg4/
包根据 div 属性和内容加载选项卡 svg。 我希望能够更改 div 的内容以呈现新的选项卡 svg。 我该怎么做?
<div class="vextab-auto"
width=680 scale=1.0 editor="true"
editor-width=680 editor-height=330>
options space=20
tabstave notation=true key=A time=4/4
notes :q =|: (5/2.5/3.7/4) :8 7-5h6/3 ^3^ 5h6-7/5 ^3^ :q 7V/4 |
notes :8 t12p7/4 s5s3/4 :8 3s:16:5-7/5 :h p5/4
text :w, |#segno, ,|, :hd, , #tr
options space=25
</div>
# javascript
scratch_tab = "options space=40 font-size=14\n" +
"tabstave notation=true key=A\n" +
"notes :q (5/2.5/3.7/4) $A7#9$ 15h16/1 20/1"
$('.editor').val(scratch_tab);
$('.editor').keyup();
那个键显示即使触发键也无济于事。
【问题讨论】:
-
这是一个不错的动画codepen.io/freedom8/pen/BjbPVg
-
这对我一点帮助都没有。
-
@MikeJohnson 请提供minimum reproducible example,即完整的 HTML 来测试它。还请提供预期的输出,例如以简单的动画 gif 的形式(看看你在追求什么,因为 Jens 的评论似乎正是你所要求的......)
标签: javascript html jquery svg