How to trigger JS when the mouse moves over a div block? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:13:57
Original
1515 people have browsed it

Homepage




In this sentence, there will be action only when the mouse is moved to the two words "Home Page", which is the link.

How to move it to a div to have an effect?


Reply to discussion (solution)

The area size of a link is the size of the text display area inside it. Just write onmouseover as a div event.

a is placed in a div.

onmouseover is written as a div

You didn’t make it clear which DIV and what is the order of the code.

Use jQuery to set an id to the target div, and then execute the statement $("#id").hover(function(){},funtion(){})

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!