In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article "jquery how to set the mouse click div will hide div" article knowledge point most people do not understand, so small make up for you to summarize the following content, detailed content, clear steps, has a certain reference value, I hope you can read this article to gain something, let's take a look at this article "jquery how to set the mouse click div will hide div" article bar.
jquery Set the method that mouse click div will hide div: 1. Bind click event to div element and set event handling function;2. In event handling function, use hide() method to set div hide, syntax is "div element object.hide()".
Operating environment for this tutorial: Windows 10 system, jquery version 3.2.1, Dell G3 computer.
jquery how to set mouse click div will hide div
hide() method hides the selected element.
The syntax is:
$(selector).hide(speed,easing,callback)
Speed is optional. Specifies the speed at which the concealment effect is performed.
Possible values:
millisecond "slow""fast"
Easing is optional. Specifies the speed of elements at different points in the animation. The default value is "swing."
Possible values:
"swing" -slow at the beginning/end, fast in the middle "linear" -uniform movement Tip: More easings are available in the extension.
Callback is optional. The function to be executed after the hide() method is executed.
A click event occurs when an element is clicked.
The click() method triggers a click event, or specifies a function that runs when a click event occurs.
The syntax is:
Click event that triggers the selected element:
$(selector).click()
Add function to click event:
$(selector).click(function)
Examples are as follows:
123$(document).ready(function(){$("div").click(function(){$("div").hide();});});
Output:
The above is about the content of this article "jquery how to set the mouse click div will hide div", I believe everyone has a certain understanding, I hope the content shared by Xiaobian is helpful to everyone, if you want to know more related knowledge content, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.