Easyui tabs Height and width According to the change of IE window Adaptive code _jquery

Source: Internet
Author: User
The tabs code is as follows:
Copy Code code as follows:

<div id= "tabs" class= "Easyui-tabs" >
<div title= "TABS1" >
Tabs1
</div>
<div title= "TABS2" >
Tabs2
</div>
</div>

If the id= "tabs" Div does not set the width and height, the Easyui default width and height is auto, so that the display is normal in Google Browser, but no content is displayed by default in IE, and there is a conflict with dialog (dialog cannot pop up the window).

But go to Google search, find a solution as follows:
1. Remove the class= "Easyui-tabs" in the div
2. Add a section of JS
Copy Code code as follows:

<script type= "Text/javascript" >
$ (function () {
$ ("#tabs"). Tabs ({
width:$ ("#tabs"). Parent (). Width (),
height:$ ("#tabs"). Parent (). Height ()
});
});
</script>

After adding this code, the container is found to be very high because he gets the height of the parent container.
Workaround:
JS Repair changed to
Copy Code code as follows:

$ (' #tabs '). Tabs ({
Width: $ ("#tabs"). Parent (). Width (),
Height: "Auto"
});

Ok, it's done.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.