我正在尝试在jQuery中创建一个框架的Button Hover效果。请帮帮忙,我想在锚点标记悬停时摇动它。
它看起来是这样的:
$(document).ready(function() {
$(".neon").hover(function() {
$(this).toggle().effect("shake")
})
})
发布于 2021-03-31 13:25:11
这可以解决这个问题。
$("#toggle").hover(function() {
$( "#toggle" ).effect( "shake", {times:2}, 1000 );
});
<!doctype html>
<html lang="en">
<head>
<script src="//code.jquery.com/jquery-1.12.4.js"></script>
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
</head>
<body>
<p>Click anywhere to shake the box.</p>
<div >
<a href="" id="toggle">Try</a>
</div>
https://stackoverflow.com/questions/66881528
复制相似问题