First, I wouldn't use single quotes in your markup. There's a security hole with that. But you can't animate an image like that. How are you getting stuff from your database?   It's real easy to load an SVG using an XMLHttpRequest (ajax)... jQuery - http://plnkr.co/edit/khmnvLO3JfWRTkSuami4?p=preview more jQuey - http://plnkr.co/edit/IWTAV5jIxzSioTpj8UkJ?p=preview Vanilla - http://plnkr.co/edit/c1cHZKzolHdz6nNEcvtZ?p=preview   Or using the DOMParser... See the Pen 917a
    • Like
    1