Função jquery não funciona
02/08/2013
0
<div id="div1" style="width: 100px; height: 100px; background-color: green; color: #000;"></div> <a onclick="$('#div1').animate( { height: 150, width:10, marginLeft:100 },5000);$('#div1').animate( { height: 100, width:200, marginLeft:150 }, 1000);$('#div1').animate( { height: 20, width:100, marginLeft:200 }, 3000); " href="javascript:;">Click here to change the box</a>
Pjava
Posts
02/08/2013
Joel Rodrigues
02/08/2013
Pjava
Esse é o erro que aparece no Console. Parece meio genérico esse erro.
02/08/2013
Joel Rodrigues
08/08/2013
João Marques
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("#teste").click(function(){
$("div").animate({
marginLeft:'100px',
height:'150px',
width:'10px'
}, 5000);
$("div").animate({
marginLeft:'150px',
height:'100px',
width:'200px'
}, 1000);
$("div").animate({
marginLeft:'200px',
height:'20px',
width:'100px'
}, 3000);
});
});
</script>
</head>
<body>
<div style="background:#98bf21;height:100px;width:100px;position:absolute;">
</div>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<a href="#" id="teste">Clique aqui!</a>
</body>
</html>
14/08/2013
Gabriel Simas
<div id="div1" style="width: 100px; height: 100px; background-color: green; color: #000;"></div> <a onclick="$('#div1').animate( { height: 150, width:10, marginLeft:100 },5000);$('#div1').animate( { height: 100, width:200, marginLeft:150 }, 1000);$('#div1').animate( { height: 20, width:100, marginLeft:200 }, 3000); " href="javascript:;">Click here to change the box</a>
PJava,
Você precisa adicionar o jquery em sua página.
<script src="http://code.jquery.com/jquery-1.9.1.js"> </script>
Forte Abraço
Clique aqui para fazer login e interagir na Comunidade :)