Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery Animation Delay Adding A Class
- $(document).ready(function() {
- $('.listing div').addClass('hideText');
- $('.listing div').hover(
- function() {
- $(this)
- .stop(true)
- .removeClass('hideText')
- .animate(
- {top: '0'},
- {duration: 300, easing: 'linear', queue: false}
- )
- },
- function() {
- $(this)
- .stop(true)
- .animate(
- {top: '150px'},
- {duration: 300, easing: 'linear', queue: false}
- )
- .addClass('hideText')
- });
- $(document).ready(function() {
- $('.listing div').addClass('hideText');
- $('.listing div').hover(
- function() {
- $(this)
- .stop(true)
- .removeClass('hideText')
- .animate(
- {top: '0'},
- {duration: 300, easing: 'linear', queue: false}
- )
- },
- function() {
- $(this)
- .stop(true)
- .animate(
- {top: '150px'},
- {duration: 300, easing: 'linear', queue: false},
- function() {
- $(this).addClass('hideText');
- }
- );
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment