In my code,I have used 1000 ms as the duration value in animate function.Now I want to use a random value in place of this value.How can I do so?
<html>
<body>
<script src="jquery-1.11.0.min.js"></script>
<script>
$(document).ready(function () {
$('#btn').click(function () {
$('#i1').animate({
'margin-left': '+=1155px'
},1000);
});
</script>
<img src="images.jpg" height="100px" width="200px" id="i1"><br>
<input type="button" value="start" id="btn">
</body>
</html>