Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the failure problem of jquery controls

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "how to solve the jquery control failure problem", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let Xiaobian take you to learn "how to solve the jquery control failure problem"!

jquery control failure solution: 1, open the corresponding js code file;2, through the "$("#xxx").show("slow",function(){$(this).css("display","block")});" mode to operate.

Operating environment: Windows 7 system, jquery3.2.1 version, DELL G3 computer

What if jquery control fails?

About jquery on the control of hidden and display failure problems

Generally, we want to dynamically display or hide html jsp controls, so we can use jquery's own method

$("#id").hide(); $("#id").show();

However, sometimes we dynamically control the hidden or displayed elements in the control, then failure may occur.

For example, th tr in div or li in ul may not hide the controls in div ul, so this will be invalid.

Solution:

$("#xxx").hide("slow",function(){$(this).css("display","none")}); $("#xxx").show("slow",function(){$(this).css("display","block")});

For the function slow looked at the source code is for hidden or displayed speed control.

Optional parameters are fast,_default.

As for choosing to look at their own hobbies.

At this point, I believe that everyone has a deeper understanding of "how to solve the jquery control failure problem," so let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report