It seems that when using .attr( attributeName, value ), the attributeName is turned to lowercase. This causes an issue when trying to set the viewBox attribute using jQuery. (the attribute has an upper case 'B').
Test cases:
- setting the attribute without jQuery, using
setAttribute:
- setting the attribute using jQuery and
attr()