jquery.transit hover not working -


i trying create basic hover effect using jquery.transit.

when cursor hovers on 1 of icons, want icon scale 100%, , reduce 100% when cursor moves away.

here's example of code i'm using:

$(document).ready(function() {  $('enqbutton').hover(      function () {$(this).transition({ scale: [2] });,       function () {$(this).transition({ scale: [0] });      }); }); 

enqbutton div class.

any idea i'm doing wrong?

you not selecting class rather html element, change selector to,

$('.enqbutton') 

also must enclose functions in curly braces, try keep code formatted helps spot these errors, example of how write it;

$(document).ready(function() {     $('.enqbutton').hover(         function () {             $(this).transition({ scale: [2] });         },          function () {             $(this).transition({ scale: [0] });         }     );  }); 

doing allows spot errors otherwise hard spot saving hours of finding these errors allowing more time code!

good luck , hoped helped!


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -