This is the next question asked earlier: How to access SVG elements using Javascript However, the solution does not seem to work for me. I am testing the latest version of Chrome. I have a map of the USA as an SVG file that I downloaded to my machine and made some changes to the xml code.
I have svg embedded using an object tag and assigned the identifier "USAsvg", and first I start the steps for the child. For the onclick button, I execute the following code without success. Here "CA" is the state declared using the path tag in the svg file.
var a = document.getElementById('USAsvg'); var svgDoc = a.contentDocument; var delta = svgDoc.getElementById('CA'); alert(delta.value);
, SVG DOM , , html node, html() jQuery , ().
$('.your_div_for_svg').load('svg/file.svg', function(){ $('#some_textnode_w_id_within_svg').text('Hello word'); });
Source: https://habr.com/ru/post/1787088/More articles:Dropdowns are dragged into other containers, but not themselves? - jqueryJFile Chooser throws errors before use, only sometimes? - javaUpdate master data if exists or create a new managed entity. Can I do it faster? - iphoneМожно ли сканировать весь доступный SSID на платформе Arduino? - chttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1787087/git-remove-all-revisions-of-a-file-in-a-repository-and-replace-with-new-file&usg=ALkJrhgDRKT7h_x-Izhqe2bLRtrKWf3a8gGenerics and Entity Framework: how to return a different type depending on the column value - genericsКак мне избавиться от проблемы concurrency с операциями обновления с помощью клавиши автоматического увеличения? - sqlОшибка в CustomCell - objective-cWhat is the problem in my code? C # winforms - c #Rails - two queries combining them without SCOPES - ruby-on-railsAll Articles