JavaScript animate.css : Animate on hover script transition animation hover,animate on hover animate.css

I'm trying to accomplish a hover animation using JS, but my skills with said language are very limited. I have this script in my script.js file, as it is the only script I'm using:

$(document).ready(function() {

    animationHover('#intro-logo' 'tada')

function animationHover(element, animation){
    element = $(element);
    element.hover(
        function() {
            element.addClass('animated ' + animation);          
        },
        function(){
            //wait for animation to finish before removing classes
            window.setTimeout( function(){
                element.removeClass('animated ' + animation);
            }, 2000);           
        });
}

}

})();

The goal is that when I hover over #intro-logo, the script will add classes .animated and .tada which will animate the darn thing! However I get Uncaught SyntaxError: Unexpected string which brings me to

animationHover('#intro-logo' 'tada')

I don't know what I'm doing wrong, I used a tutorial here and it worked for the guy, but I'm having no such luck. I would sincerely appreciate anyone's help.

Thank you in advance, this community is amazing. This is my first question, but all of you guys have helped me solve hundreds of problems along my rocky way to web development prowess (much of which obviously still remains ahead).

Edit: I added the missing comma and now it seems there is a problem with the way I'm ending the document. Posted is my entire JS file, how to I properly close everything? })(); doesn't seem to work.

Answer:1

Working example:

$(document).ready(function () {

    animationHover('#intro-logo', 'tada')

    function animationHover(element, animation) {
        element = $(element);
        element.hover(

        function () {
            element.addClass('animated ' + animation);
        },

        function () {
            //wait for animation to finish before removing classes
            window.setTimeout(function () {
                element.removeClass('animated ' + animation);
            }, 2000);
        });
    }

});

Removed unnecessary } and () at the end, as well as added the comma.

Answer:2

I am trying to configure a custom context menu for jsTree. I want files to have two options [Rename, Delete] and I want folders to have one option [Create] The below code seems correct as described ...

I am trying to configure a custom context menu for jsTree. I want files to have two options [Rename, Delete] and I want folders to have one option [Create] The below code seems correct as described ...

  1. jstree custom context menu example
  2. jstree custom contextmenu
  3. jstree context menu custom action
  4. jstree add custom context menu
  5. jstree set context menu
  6. jstree custom context menu

I'm trying to see if I can do the following: Have some Javascript make a call to JavaFX. Have JavaFX then spawn a thread to do work it has been given from the Javascript. Come back to the Javascript ...

I'm trying to see if I can do the following: Have some Javascript make a call to JavaFX. Have JavaFX then spawn a thread to do work it has been given from the Javascript. Come back to the Javascript ...

I'm just curious that how can a .mov file play in a browser without any plug in support.I know that .mp4,.ogg and .webm filescan play without any plug in because the html5 video tag support them.but ...

I'm just curious that how can a .mov file play in a browser without any plug in support.I know that .mp4,.ogg and .webm filescan play without any plug in because the html5 video tag support them.but ...

  1. google play file browser
  2. play midi file browser
  3. play wav file browser
  4. play mp4 file browser
  5. play file on browser
  6. play gsm file browser
  7. play wmv file browser
  8. play ts file in browser
  9. play m3u8 file in browser
  10. play mkv file in browser
  11. play audio file in browser
  12. play mov file in browser
  13. play swf file in browser
  14. play avi file in browser
  15. play video file in browser
  16. play mp3 file in browser
  17. play pls file in browser
  18. play flv file in browser

I have this function: $(".insidediv").hide(); $(".floater").mouseenter(function(){ $(".hideimg").fadeOut(function(){ $(".insidediv").fadeIn(); }); }); $(".floater").mouseleave(...

I have this function: $(".insidediv").hide(); $(".floater").mouseenter(function(){ $(".hideimg").fadeOut(function(){ $(".insidediv").fadeIn(); }); }); $(".floater").mouseleave(...

  1. some issues with
  2. some issues with health
  3. some issues with family
  4. some problems with
  5. some problems with technology
  6. some problems with regulatory agencies
  7. have some issues with
  8. some issues with the current
  9. what are some issues with outsourcing jobs
  10. what are some issues with cloning
  11. there are some issues with
  12. we have some issues with
  13. i had some issues with
  14. some general issues associated with testing