0
I have an image in SVG and when I have the mouse over the image make an Alert and change the cursor to the hyperlink cursor. How can I do that?
<svg>
<image />
</svg>
0
I have an image in SVG and when I have the mouse over the image make an Alert and change the cursor to the hyperlink cursor. How can I do that?
<svg>
<image />
</svg>
3
<svg class="element">
<image />
</svg>
.element:hover{
cursor:pointer;
}
0
Add the event onmouseover available in SVG components
SVG
<svg>
<image onmouseover="alert('Isso é um alert');"/>
</svg>
CSS
#svg-image:hover { cursor: pointer }
-2
Through the use of jQuery, you have the onHover function. Basically you have to do:
$(document).ready(function(){
$("image").hover(function(){
$(this).css( 'cursor', 'pointer' );
console.log("Estou em cima da imagem");
}
);
});
Browser other questions tagged javascript
You are not signed in. Login or sign up in order to post.