Skip to content

Instantly share code, notes, and snippets.

@anad-zeal
Created August 29, 2018 00:45
Show Gist options
  • Save anad-zeal/df6058d9ababa78413e2bc241ad81f9f to your computer and use it in GitHub Desktop.
Save anad-zeal/df6058d9ababa78413e2bc241ad81f9f to your computer and use it in GitHub Desktop.
svg circle path
<div class="container">
<svg width="500px" height="500px">
<rect x="0" y="0" width="100" height="100" fill="white"/>
<circle cx="50" cy="50" r="50"/>
</svg>
</div>
$('rect').hover(function() {
$('rect')
.attr('width', 400)
.attr('height', 300)
.attr('fill', 'yellow');
});
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
.container {
margin: 20px;
}
circle, rect {
stroke: none;
}
circle {
fill: red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment