-1
我写了一个简单的jQuery代码,用于将按钮的div移动到右侧。我已经写了jQuery代码,因为这是这里的代码:SyntaxError:missing}在jQuery代码执行的属性列表显示后
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title></title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
$('#leftscroll').click(function() {
$('#buttonmove').animate({'marginLeft' : '+= 30px'
)};
)};
)};
</script>
<style>
.button{
width:100px;
height:100px;}
div #buttonmove{
float:left;
margin: auto 0;
position:absolute;
}
</style>
</head>
<body>
<div>
<a id="leftscroll" href="#">>></a></div>
<div id="buttonmove">
<button type="button" id="button">Click Me!</button>
<button type="button" id="button">Click Me!</button>
<button type="button" id="button">Click Me!</button>
<button type="button">Click Me!</button>
</div>
<div class="preyear">
<a id="rightscroll" href="#"><<</a>
</div>
</body>
</html>
当我执行此代码,这是不执行,并显示错误
请帮我...
@ user3785854 ...我想以上答案将解决您的问题,如果需要更多的帮助,然后评论。 – 2014-09-27 08:15:14