简体   繁体   中英

Change element css only on mouse down event with jquery

I want to change a div css only on mousedown event with jQuery.

$('#xxx').mousedown(function (e) {
    $("#xxx").animate({
        height: '600px',
        width: '600px'
    }, 'slow');
})

The problem is that it runs on mouse click too and I want event called only on mousedown event.

使用mouseover().focus( handler )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM