0
I am creating an animation on the main wordpress page. To do this I am doing it as follows:
$(document).ready(function(){
(function mover(i){
$('#seta').animate({top: (i ? "-" : "+")+"100px"}, 1000, function(){
mover(!i);
});
}())
});
#seta{
position: relative;
}
.container img {
max-width: 200px;
max-height:250px;
width: auto;
height: auto;
}
.container {
clear: both;
margin-top: 20px;
}
img {
vertical-align: top
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="seta" class="container">
<a href="http://xxxxxxxxx.xx/recrutamento/"><img src="http://xxxxxxxxxxx.xx/wp-content/uploads/small.png" width="320" height="205" /></a>
<h1>Procura Emprego! Clique aqui!</h1>
</div>
I’ve tested it and it works, but I’m not getting it to work on my site.
I show in the picture how I’m doing:
But I get this error on the page as shown in the image:
Yes you will receive an error even, by the print you sent Javascript is in the middle of tags
p
.– LeAndrade
@Leandrade but without the tags, read the javascript code as if it were text, how can I solve?
– Bruno