{"action":"created","issue":{"url":"https://api.github.com/repos/maxwellito/vivus/issues/78","labels_url":"https://api.github.com/repos/maxwellito/vivus/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/maxwellito/vivus/issues/78/comments","events_url":"https://api.github.com/repos/maxwellito/vivus/issues/78/events","html_url":"https://github.com/maxwellito/vivus/issues/78","id":122881274,"number":78,"title":"How can I target a class or multiple SVG's on 1 page?","user":{"login":"christ0ph3r","id":5915361,"avatar_url":"https://avatars.githubusercontent.com/u/5915361?v=3","gravatar_id":"","url":"https://api.github.com/users/christ0ph3r","html_url":"https://github.com/christ0ph3r","followers_url":"https://api.github.com/users/christ0ph3r/followers","following_url":"https://api.github.com/users/christ0ph3r/following{/other_user}","gists_url":"https://api.github.com/users/christ0ph3r/gists{/gist_id}","starred_url":"https://api.github.com/users/christ0ph3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christ0ph3r/subscriptions","organizations_url":"https://api.github.com/users/christ0ph3r/orgs","repos_url":"https://api.github.com/users/christ0ph3r/repos","events_url":"https://api.github.com/users/christ0ph3r/events{/privacy}","received_events_url":"https://api.github.com/users/christ0ph3r/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-18T05:21:09Z","updated_at":"2015-12-18T18:50:02Z","closed_at":null,"body":"Any examples of this?  I read that you can target an ID or object but don't quite understand how to do that.  When I try it with ID it only does the first one and then stops.  This is my attempt at trying to get it to do class.\r\n\r\n```\r\n       jQuery(function () {\r\n         var myCallback;\r\n         var myElement = document.getElementsByClassName(\"icon-vivus\");\r\n         new Vivus(myElement, {duration: 50, type: 'async' }, myCallback);\r\n      });\r\n```"},"comment":{"url":"https://api.github.com/repos/maxwellito/vivus/issues/comments/165869316","html_url":"https://github.com/maxwellito/vivus/issues/78#issuecomment-165869316","issue_url":"https://api.github.com/repos/maxwellito/vivus/issues/78","id":165869316,"user":{"login":"maxwellito","id":1097232,"avatar_url":"https://avatars.githubusercontent.com/u/1097232?v=3","gravatar_id":"","url":"https://api.github.com/users/maxwellito","html_url":"https://github.com/maxwellito","followers_url":"https://api.github.com/users/maxwellito/followers","following_url":"https://api.github.com/users/maxwellito/following{/other_user}","gists_url":"https://api.github.com/users/maxwellito/gists{/gist_id}","starred_url":"https://api.github.com/users/maxwellito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxwellito/subscriptions","organizations_url":"https://api.github.com/users/maxwellito/orgs","repos_url":"https://api.github.com/users/maxwellito/repos","events_url":"https://api.github.com/users/maxwellito/events{/privacy}","received_events_url":"https://api.github.com/users/maxwellito/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T18:50:02Z","updated_at":"2015-12-18T18:50:02Z","body":"*Back on my computer, I can write a snippet :)*\r\n\r\n```js\r\njQuery(function () {\r\n  // Define your callback\r\n  var myCallback = function () {};\r\n\r\n  // Get your HTMLCollection of SVG to animate\r\n  var myElements = document.getElementsByClassName(\"icon-vivus\");\r\n\r\n  // Go across them to create a Vivus instance\r\n  // with each of them\r\n  for (var i = myElement.length - 1; i >= 0; i--) {\r\n    new Vivus(myElements[i], {duration: 50, type: 'async' }, myCallback);\r\n  }\r\n});\r\n```"}}