Does the attr() in jQuery force lowercase?

后端 未结 4 758
广开言路
广开言路 2020-12-03 20:29

I\'m trying to manipulate the svg \'viewBox\' attribute which looks something like this:

 ...          


        
4条回答
  •  感动是毒
    2020-12-03 21:23

    I was able to use pure javascript to get the element and set the attribute by using

    var svg = document.getElementsByTagName("svg")[0];
    

    and

    svg.setAttribute("viewBox","...");
    

提交回复
热议问题