title: On click svg image path get path id?
body: <p>I tried to get an id of svg image path ,but it's not working ,on DOM ready i have tried it on document ready also i have tried.How can i get it done.I have used svg image (NewTux.svg) from this url <a href="http://upload.wikimedia.org/wikipedia/commons/b/b0/NewTux.svg" rel="nofollow">http://upload.wikimedia.org/wikipedia/commons/b/b0/NewTux.svg</a></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div id="main_wrapper"&gt;
      &lt;object type="image/svg+xml" data="NewTux.svg"&gt;Your browser does not support SVG&lt;/object&gt;
  &lt;/div&gt;
  
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="http://oss.maxcdn.com/libs/snapsvg/0.1.0/snap.svg-min.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
      $(document).ready(function(){
          $('path').click(function(){
              alert($(this).attr('id'));
          });
      });
  
      /*$(window).load(function(){
          $('path').click(function(){
              alert($(this).attr('id'));
          });
      });*/
  
  &lt;/script&gt;
  </code></pre>
  
  <p></p>
  
  <p></p>