mam taki problemik otóż napisałem klase w jquery odpowiedzialna za animacje i wszystko działa tak jak chce ale problem pojawia się gdy probuję podpiąć ją pod input submit - animacja nie działa.Ktoś coś doradzi?
jquery:
function hoverAnimation(obj){ var params = []; var params = obj; var length = params.length; var i =0; for (i; i < length ; i++) { $j(params[i]) .css({ 'backgroundPosition': '0 0' }) .hover( function(){ $j(this).stop() .animate({ 'opacity': 0 }, 650); }, function(){ $j(this).stop() .animate({ 'opacity': 1 }, 650); } ); } } var tablica = ['.menu_ofirmie a','.menu_oferta a','.menu_galeria a','.menu_referencje a', '.menu_kontakt a','.more a','.send a','.send input[type=submit]']; hoverAnimation(tablica);
css:
.send { display:block; width:133px; height:39px; background:url('<?php echo Conf_Static::IMAGES;?>wyslij.png') no-repeat 0 -38px; border:0px solid black; } .send a,input[type=submit]{ display:block; width:133px; height:39px; background:url('<?php echo Conf_Static::IMAGES;?>wyslij.png') no-repeat 0 0; text-indent:-9999px; } .send input[type=submit],a:hover { background-position: 0 53px; }
html:
<input class="send" type="submit" value="" />
Przykład live:
http://marli.sry.pl/marli/example.html
Z góry dzięki