Closed neone35 closed 6 years ago
Done SVG coloring after 4 hours!!!
// Coloring SVG on footer hyperlink hover
$( ".a-github, .a-twitter" )
.mouseover(function() {
var svgDoc = $(this).children("object")[0].contentDocument; // Get the document object for the SVG
if ($(this).hasClass("a-github")) {
$("path", svgDoc).css({ 'fill' : '#6e5494'});
}
else if ($(this).hasClass("a-twitter")) {
$("path", svgDoc).css({ 'fill' : '#00aced'});
}
})
.mouseout(function() {
var svgDoc = $(this).children("object")[0].contentDocument; // Get the document object for the SVG
$("path", svgDoc).css({ 'fill' : '#000'});
});
Possible fix suggestion for svg and text link https://stackoverflow.com/questions/27757731/get-fill-attribute-from-path-in-svg-by-jquery