bratsun
11/16/2014 - 11:07 AM

Replace background image with inline SVG

Replace background image with inline SVG

$(window).load(function() {
  $('.shareme a, .social-link').each(function() {
    var t = $(this);
    var url = t.css('background-image').replace('url("','').replace('")','');
    t.load(url,function() {
      t.addClass('loaded');
    });
  });
});