How can I do to return my div
to the starting position if it reaches a certain point on the left? I have the following current code:
$(document).ready(function() {
$("#botao").click(function() {
$(".maior").animate({left:"-=400px"},1000)
});
});
CSS:
.maior {
width: 1614px;
height: 433px;
float: right;
position: absolute;
font-family: "Gill Sans", "Gill Sans MT", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
color: #FFF;
font-weight: bolder;
overflow: hidden;
left: 9px;
top: -4px;
}