Jquery sliding door implementation
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Jquery can also make a JS sliding door effect.
First define a div to hide the display of the div none
After all ('your div'}.click(('hidden div'}.css ({'display': 'block', 'top': 'This. top + 10 '}))
It is mainly to define a div so that his postion is an absolute position, and then hide it. The div is displayed after it is clicked. When it is moved to the corresponding position, it only needs to be hidden and set back to none.
[View the figure and answer] How to Implement AJAX | JQUERY | HTML | CSS | sliding door | tab | Dynamic Loading
Well, I think lz is complicated.
Indeed, the three option cards have no content during the first loading. When each tab is clicked for the first time, ajax is used to obtain the panel content.
Of course, each station has its own practice. If it is mine, I will do this.
Define an object variable on this page. The data is returned in json format (in fact, it is related to strings)
When you click tab, check whether the variable has been assigned a value.
If yes, load the panel content directly.
If no, ajax request data is performed.
I don't think it is necessary to determine whether the Panel contains rice or rice. The panel content is cleared every time the Panel content is loaded.
If you want to execute an ajax request, you just need to check that there is no such data in the memory.
I hope it will help you
Last, Merry Christmas