Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Implementing jQuery on SVG for the WordPress Header Logo Reply To: Implementing jQuery on SVG for the WordPress Header Logo

#169701
chrisburton
Participant

@ctvonline @psionicsin Check your console errors. There seems to be a conflict. Instead of using $, swap that with the word jQuery.

So it should look like this:

jQuery('.bm-logo').hover(
    function ($) {
      $('.logo-square, .logo-bg').attr('fill', '#b565a7 ');
      $('.logo-square').css({
        '-webkit-transform': 'scale(0.6)',
        '-moz-transform': 'scale(0.6)',
        '-o-transform': 'scale(0.6)'
      });
    }, function ($) {
      $('.logo-square, .logo-bg').attr('fill', '#404040 ');
      $('.logo-square').css({
        '-webkit-transform': 'scale(1)',
        '-moz-transform': 'scale(1)',
        '-o-transform': 'scale(1)'
      });
    }
  );