access svg elements with jquery

by Ramshan 2014-05-14 12:45:40

you can access svg elements with jquery as like,

var getSvgEle = document.getElementById("add");

  getSvgEle.addEventListener("load",function(){

     var getSvgDoc = getSvgEle.contentDocument; 

     var path1 = $(getSvgDoc).find("path");

     path1.attr("fill", "#000");

 },false);

 
1105
like
0
dislike
0
mail
flag

You must LOGIN to add comments