Sorry to say, but it’s not possible, because none of the elements from the SVG are read in the DOM, so CSS and Javascript don’t see them. All it sees is the <img>
block, none of its contents. You have to import your SVGs into the page to have them be able to be manipulated.
Check out the CSS Tricks article on SVGs
Related Posts:
- JavaScript Loading Screen while page loads
- Click button copy to clipboard
- How to make html table vertically scrollable
- How to make Bootstrap carousel slider use mobile left/right swipe
- bootstrap 3 navbar collapse button not working
- How to center image in carousel
- Can Twitter Bootstrap alerts fade in as well as out?
- Play/pause HTML 5 video using JQuery
- jQueryUI dialog width
- Random background images CSS3
- How do I remove a box-shadow effect from an element when another element is hovered?
- Slide right to left?
- Automatically decrease font size for long words
- Best approach for loading a sidebar Only if the screen max-width is >900px?
- Twitter Bootstrap Use Collapse in Custom Post Type
- Gravity list field override and adding javascript [closed]
- Add a class to posts in increments of 2
- Override theme style with other CSS on a specific page
- How can I make this custom menu work?
- Remove WordPress scripts
- How to make an WordPress element sticky? [closed]
- Accordion scrolls page too low after clicking on the title [closed]
- show/hide div with simple jQuery script [closed]
- What is the propre way to include jQuery UI Datepicker’s CSS in plugin?
- Superfish Menu Not Loading
- Problem Implementing parallax in header of bp-default theme
- Is it OK combined wp-include js, jquery, css? [closed]
- jQuery Drill Down iPod Menu FOUC and Selecting Current page
- jQuery Validation plugin and Bootstrap 4 CSS classes
- Getting click on item to open closest relevant element (popup) with jQuery
- How Do I change Markup of a link in WordPress
- jQuery for Fade Preload Causes My Site Favicon to Disappear from Tab of Browser
- Lightbox scroll page down on iPhone
- jQuery function not working in WordPress but works in jsfiddle
- Site images are fixed in front of my site content [closed]
- WP Media Uploader modal conflicts with Bootstrap modal
- :first-child applying to all links [closed]
- How to update scrollbar when using Jetpack’s Inifnite Scroller?
- Hide input field when second input field is in focus
- change the icon of a custom post type in WordPress to use twitter boostrap
- Drop Down Category Menu Not Working
- controlling the showing and hiding of the website logo
- How do I add Javascript and CSS files into WordPress?
- can’t make jQuery work (change image on time interval) [closed]
- How to send multiple data fields via Ajax?
- Adding an onclick function to go to url in JavaScript?
- How to generate a simple popup using jQuery
- Download File Using jQuery
- Jquery Ajax Posting JSON to webservice
- Change text on hover, then return to the previous text
- correct way of comparing string jquery operator =
- Jquery to change form action
- Split string in jquery
- Detecting value change of input[type=text] in jQuery
- Javascript : array.length returns undefined
- Comparing dates in jquery
- “Uncaught TypeError: a.indexOf is not a function” error when opening new foundation project
- Correct Method to run scripts with dependencies without enqueue?
- How to prevent wordpress from loading old versions of jquery in wp_head();?
- Moving jQuery to the footer without using de-register in WordPress
- This jQuery snippet doesn’t seem to work with WordPress
- How to Use JSON With AJAX?
- Hide/show customizer controls based on other settings in Customizer
- When does WordPress automatically enqueue jQuery?
- jQuery Tree View and wp_list_pages
- Cannot prefill hidden Ninja Forms fields
- How to show jquery popup only in one page or once?
- How to get those data using with ajax json?
- SSL issues with WordPress site
- Blip Slideshow plugin Mootools/jQuery conflict
- How to tell WordPress that jQuery exists on the page to avoid duplicates via wp_enqueue_scripts
- Which jQuery packages are included in WordPress 3.1.2?
- How to use jquery included with wordpress for jpanelmenu
- Cannot get Jquery to work with wordpress
- Problem getting .js file to load via a plugin
- Using jquery-1.7.2.min.js instead of the wordpress jquery
- Adding jQuery UI elements to WordPress page
- Jquery UI Google CSS, from where?
- datepicker for custom post type admin
- Disable Cloudflare Rocket Loader for jQuery javascript and make it load first
- jQuery(selector) vs. $(selector)
- Disable auto hide of the login form on Woocommerce’s checkout page
- Sorting dynamic table content with jQuery
- jQuery .load and WP function
- How can I get this menu container to be the height of the contents?
- JQuery is not working after complete load of the page
- Carousel Slider For Custom PHP Snippet Is Not Working
- why does so many javascript libraries are loaded along with my website?
- Add a jQuery snippet for sepcific user role
- Dynamic image grid gallery
- Like/Dislike Bar not working when updating
- Are you sure popup on Contact Form 7 [closed]
- Using jQuery toggle() in WordPress post to show/hide Tweet button?
- Call a Simple JQuery from within Flash
- Ajax request with jQuery without WP_ajax
- JS file not loading [closed]
- How can insert JQuery in WordPress? [closed]
- Theme using masonry layout script rendering overlaped images in Google Chrome [closed]
- Jquery in IE, fully messed up
- Making the Google Maps API non readable