How to solve the failure problem of jquery controls
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!