I'm trying to manipulate the svg 'viewBox' attribute which looks something like this:
<svg viewBox="0 0 100 200" width="100" ...> ... </svg>
Using
$("svg").attr("viewBox","...");
However, this creates a new attribute in the element called "viewbox". Notice the lowercase instead of intended camelCase. Is there another function I should be using?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…