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

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -