var getSvgEle = document.getElementById("add"); getSvgEle.addEventListener("load",function(){ var getSvgDoc = getSvgEle.contentDocument; var path1 = $(getSvgDoc).find("path"); path1.attr("fill", "#000"); },false);