1

please find the below VML element

<v:shape id=container_vml_CrosshairVertical style="HEIGHT: 1000px; POSITION: absolute; LEFT: 0px; TOP: 0px; VISIBILITY: visible; WIDTH: 1000px" coordsize = "1000,1000" fillcolor = "white" strokecolor = "black" strokeweight = "1pt" path = " m513,58 l513,374 e"></v:shape>

am going to change the path attribute value by path="M 426 58 L 426 374" when i use the following code to set the attribute

var val="M 426 58 L 426 374"
 $element.attr('path', val);

it again creates new attribute in that element.Please refer the below code after executing.

<v:shape id=container_vml_CrosshairVertical style="HEIGHT: 1000px; POSITION: absolute; LEFT: 0px; TOP: 0px; VISIBILITY: visible; WIDTH: 1000px" path="M 426 58 L 426 374" coordsize = "1000,1000" fillcolor = "white" strokecolor = "black" strokeweight = "1pt" path = " m513,58 l513,374 e"></v:shape> 

i can't get the exact reason why it creates new attribute again ?

Thanks,

Siva

SivaRajini
  • 7,225
  • 21
  • 81
  • 128
  • possible duplicate of [Highcharts adds duplicate xmlns attribute to SVG element in IE](http://stackoverflow.com/questions/17265376/highcharts-adds-duplicate-xmlns-attribute-to-svg-element-in-ie) – Paul Sweatte Dec 25 '14 at 00:40
  • @Paul: I’m not sure this is a duplicate of that; first off, that concerns a particular library. If it were a question regarding how to fix the issue in the library, that would be another story, but right now the answers point out that this was fixed in another version. That is not useful to people not using Highcharts. Second, that concerns `xmlns` and whether it was automatically added or not; the `path` attribute, on the other hand, is never automatically added by `createElementNS`, so it is doubly irrelevant. – icktoofay Dec 26 '14 at 01:31

0 Answers0