Home > Web Front-end > JS Tutorial > The height and width of EasyUi tabs are adaptive code according to the changes of IE window_jquery

The height and width of EasyUi tabs are adaptive code according to the changes of IE window_jquery

WBOY
Release: 2016-05-16 18:17:48
Original
1215 people have browsed it

The tabs code is as follows:

Copy code The code is as follows:


 

tabs1
 


tabs2
 



If the width and height of the div with id="tabs" are not set, the default width and height of easyUI are auto, like this It displays normally under Google browser, but does not display any content by default under IE, and conflicts with the dialog (the dialog cannot pop up the window).

I had no choice but to search on Google and found a solution as follows:
1. Remove class="easyui-tabs" in the div
2. Add a piece of JS
Copy code The code is as follows:



After adding this code, I found that the container will be very high because it Obtain the height
of the parent container. Solution:
JS is modified to
Copy the code The code is as follows:

$('#tabs').tabs({
 width: $("#tabs").parent().width(),
 height: "auto"
} );

Ok, done
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template