neone35 / butter-blog

Personal blog built with Jekyll
https://neone35.github.io/butter-blog/
0 stars 0 forks source link

SVG images in the footer are broken #1

Closed neone35 closed 6 years ago

neone35 commented 6 years ago

Possible fix suggestion for svg and text link https://stackoverflow.com/questions/27757731/get-fill-attribute-from-path-in-svg-by-jquery

neone35 commented 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'});
      });