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 http://upload.wikimedia.org/wikipedia/commons/b/b0/NewTux.svg
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div id="main_wrapper">
<object type="image/svg+xml" data="NewTux.svg">Your browser does not support SVG</object>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="http://oss.maxcdn.com/libs/snapsvg/0.1.0/snap.svg-min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('path').click(function(){
alert($(this).attr('id'));
});
});
/*$(window).load(function(){
$('path').click(function(){
alert($(this).attr('id'));
});
});*/
</script>