Forums

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

Home Forums CSS Need Help with SVG hover effect

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #267423
    svgnewbie
    Participant

    I have a svg image on my html page embedded using the object tag :

    https://codepen.io/anon/pen/KQBxpr

    What i need is to be able to swap the displayed SVG with another SVG on hover and I am stuck.

    I need to use the object tag for this because the image is a svg file and the response headers from the image storage host returns content type XML which prevents me from using the img src method to display the image

    any help would be appreciated.

    #267434
    webinuse
    Participant

    You can use jQuery for hover.


    $("yourClass or ID").hover(function(){ $(this).attr('data', 'yournewurlhere'); });
    #267435
    svgnewbie
    Participant

    i tried it.. but it didn’t seem to work : https://codepen.io/svgnewbie/pen/KQBxpr

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.