jquery-hover

Changing only y pos of background image via Jquery

自古美人都是妖i 提交于 2019-11-28 03:50:39
问题 I want to change button's background image y position with hover function. Is there a simple way of keeping xpos or should I get position first, split it and use again with $.css() again. I should change all 3 span's background position if somebody hover's any of them. So bt_first:hover not seems usable. Here is my usage. I wrote #should stay same# to place that I don't want to change value of xpos: $('.bt_first,.bt_sec,.bt_third').hover(function(){ $('.bt_first,.bt_sec,.bt_third').css({

How to: Add/Remove Class on mouseOver/mouseOut - JQuery .hover?

核能气质少年 提交于 2019-11-27 21:09:32
Looking to change the border color on a box.. ..when the user mouses over/out.. Here's the attempted code.. Needs Work! JQuery: <script> $("result").hover( function () { $(this).addClass("result_hover"); }, function () { $(this).removeClass("result_hover"); } ); </script> CSS3: <style> .result { height: 72px; width: 100%; border: 1px solid #000; } .result_hover { border: 1px solid #fff; } </style> HTML5: <div class="result"> <div class="item"> <div id="item1"> <i class="icon"></i> ## </div> </div> <div> Thanks for looking You forgot the dot of class selector of result class. Live Demo $("

How to: Add/Remove Class on mouseOver/mouseOut - JQuery .hover?

妖精的绣舞 提交于 2019-11-27 04:29:27
问题 Looking to change the border color on a box.. ..when the user mouses over/out.. Here's the attempted code.. Needs Work! JQuery: <script> $("result").hover( function () { $(this).addClass("result_hover"); }, function () { $(this).removeClass("result_hover"); } ); </script> CSS3: <style> .result { height: 72px; width: 100%; border: 1px solid #000; } .result_hover { border: 1px solid #fff; } </style> HTML5: <div class="result"> <div class="item"> <div id="item1"> <i class="icon"></i> ## </div> <