It has been more than a month of practice today, and the company has assigned me very few tasks. Ah, it feels a bit uncomfortable. In this case, I still have something to do. To put it bluntly, when I was writing my graduation project today, a miracle occurred after I bound jquery's toggle method to an element. All the elements bound to this method were hidden. At the beginning, I did not expect that there was a problem here. I found it only for a long time because I bound the toggle method. But why is the element hidden after binding this method?
In fact, I don't know the specific reason. I found out by searching for information that jquery's functions have changed since version 1.9, and multiple events are not supported in turn, after half a day, it turned out to be a version issue. Therefore, there are two solutions:
1. Change the jquery version at a low point.
2. If you do not want to change to a lower version of jquery, You can implement it through counters. Defines a global variable in js to record the number of clicks on the element you want to bind to the click event to achieve the same effect.
Ah, you have encountered such a problem ......