user39054
user39054

Reputation:

not able to get any elements to bounce

I have this working on a plain html page, but now that I've brought it into wordpress, it does not. All of the jQ libs, (jQuery, ui-core, effects) are enqueued and loaded, my script is enqueued and loaded. I can even use my script below to get the background color to change the elements.

Just not able to get any elements to bounce.

my script:

jQuery( document ).ready(function( $ ) {

    //Add bounce effect 
    $('#bouncy1').mouseover(function () {
          $(this).effect("bounce", { times:2 }, 700);
    });

});

The HTML:

           <!-- remove the # in the div id -->
           <div id="#bouncy1">
                        <div id="copyright">
                        <p><?php echo date('Y'); ?></p>
                        </div>
            </div>

Upvotes: 0

Views: 41

Answers (1)

m90
m90

Reputation: 11822

You are using the element's id including the # in your markup.

This should probably read:

<div id="bouncy1">
  <div id="copyright">
    <p><?php echo date('Y'); ?></p>
  </div>
</div>

Upvotes: 1

Related Questions