The style class in the CSS file is overwritten, the variables in the JS file do not define the problem

Source: Internet
Author: User

The style class part of the CSS stylesheet in the ExtJS control is somehow overwritten

Cause of the problem:


Why is it?

Because when we call the CSS style of the component W, we write our own CSS style A,ext component and the CSS style b,a is we use CLS: ' A ' to put in. So what is this w that repeats in two different styles?

This depends on the introduction of CSS style sheet order, if the first to introduce their own write, and then introduce the EXT, then the browser first read their own CSS style, and then read the style of ext. As a result, our own CSS style was overwritten.

Workaround:


That's right.


The variable in the JS file does not define the problem

Problem Description:

Readermanagementdata.js


Readermanagementfunction.js


Html


Results:


Note: Filterbuttonarray is also a variable parameter defined in the Readermanagementdata.js file, which is also called in readermanagementfunction.js, resulting in an error.


Workaround:

A.js file (readermanagementdata.js)


B.js file (readermanagementfunction.js)


HTML file


This is the right order. For example, like this JS file call JS file, it is necessary to introduce them in the same HTML and then can be used directly, no longer b.js call a.js in the same page data, in the B.js and introduce a.js file code.


The style class in the CSS file is overwritten, the variables in the JS file do not define the problem

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.