Hello,
I'm doing a website and I want the name of the author of the post to slide when the users hovers on the post.
Unfortunately, nothing happens, this is the code, could you please tell me where the error is? Thanks.
- var isHovering = true;
- $(document).ready(function(){
- $(".posts").hover(function(){
- if(isHovering == true) {
- $("p.author ").animate({
- left: '200px',
- border: '0px'
- })
- isHovering = false;
- }
- else {
- $("p.author").animate({
- left: '0px',
- border: '2px';
- })
- isHovering = true;
- }
- })
- });