When developing the Sina Weibo plug-in for Ao you, jquery encountered some problems. The reasons and solutions are as follows.
1. thickbox Parameters
In the thickbox example, it is called as inline, for example, # tb_inline?Height= 300 &Width= 300 &Inlineid= Myonpagecontent.
However, the height of the pop-up layer cannot be set for this call. When the tb_parsequery method is debugged, it is found that the above entire string is passed in, while the parse method separates Parameters Based on; or, the first parameter cannot be obtained.
Clever solution: Add a useless parameter to replace height as the first parameter. For example, # tb_inline? A = &Height= 300 &Width= 300 &Inlineid= Myonpagecontent.
2. slidedown when using the interface
When the interface plug-in is used, if the element is in the center, slidedown will generate a shift. When it appears, it will suddenly appear on the leftmost side, and then appear in the center with the click or hover.
Clever solution: Set another DIV in the outer layer and use the slidedown method for this Div.
3. thickbox Leakage
When thickbox displays a DIV, only the elements in it are displayed, without the background of this Div.
Clever solution: Use a div to contain all the elements, and set the CSS attribute of the div.
4. Problems with slide of Relative Elements
The relative element is relative positioning. If the element to be located also needs slide, the position of this element will be erratic.
Clever solution: discard relative positioning and use js to calculate the margin of this element to replace left and top attributes.