Home  >  Article  >  Web Front-end  >  Problems when using tabs of jquery easyui_jquery

Problems when using tabs of jquery easyui_jquery

WBOY
WBOYOriginal
2016-05-16 18:31:421009browse

You can also download it at jquery easyui, or go to the official website to download and view documentation help.

Problems when using tabs of jquery easyui_jquery

I have recently used tabs in jquery easyui, but found a problem: if you set the div of tabs to display:none, and then write a function change(){$("#tabs").css( "display","block")} to display the tabs. When change() is executed, the tabs are not displayed normally.

should read:

Problems when using tabs of jquery easyui_jquery

The result is displayed as:

Problems when using tabs of jquery easyui_jquery

Later, I kept trying and found that if tabs are initially display:block, then $(document).ready(function(){$("#tabs").css("display":"none")}) Set it up so that after the page loads, set tabs to none, and then click the change button to display it.

I thought this was a bug in jquery easyui, so I sent an email to the author of jquery easyui and told me my situation. The next day he replied that there was no problem with jquery easyui's tabs, saying that I should write $("#tabs").css("display","block").tabs('resize') in the change() method like this ;

I tried it and it is indeed the case. Just add .tabs('resize') afterwards to reset the size of the tabs.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn