“JQuery on Hover Event” Code-Antworten

JQuery Hover -Funktion

$(document).ready(function() {
            $("p").hover(function() {
                $(this).css("background-color", "green");
            }, function() {
                $(this).css("background-color", "yellow");
            });
        });
Hungry Hippopotamus

JQuery on Hover Event

$(".selector").on({
    mouseenter: function () {
        //stuff to do on mouse enter
    },
    mouseleave: function () {
        //stuff to do on mouse leave
    }
});
Weary Wildebeest

Hover JQuery

$( "div.enterleave" )
  .mouseenter(function() {
    n += 1;
    $( this ).find( "span" ).text( "mouse enter x " + n );
  })
  .mouseleave(function() {
    $( this ).find( "span" ).text( "mouse leave" );
  });
Sergiu The Man

Ähnliche Antworten wie “JQuery on Hover Event”

Fragen ähnlich wie “JQuery on Hover Event”

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen