I\'m trying to manipulate the svg \'viewBox\' attribute which looks something like this:
...
you want to make sure you remove the attr if it already exists before manipulating it
$("svg").removeAttr("viewBox")
and then recreating it
$("svg").attr("viewBox","...");