When jquery uses the content in the HTML () setting, the IE browser reacts slowly.

Source: Internet
Author: User
Recently, try to develop a simple online report with the following basic workflow:

index.html page has a DIV element, id= "div_result", the default does not have any content;
The index.html page has a jquery code that uses $.get () to send a request to /test.php , returning the contents of a table's HTML code, using $ ("#div_ Result"). The HTML () output is in the div element of the current page.

The returned HTML code (table) contains the jquery code, which is the function of the table style (interlaced color, select row highlighting).

Problems that arise:
In Chrome : Quickly move the mouse over the table and select the highlight effect in the row to respond very quickly.
In all IE browsers: The above effects appear with noticeable lag, regardless of the number of table rows.

Stop $ ("Div_result"). html (), manually add a static table below the div element in index.html and populate the test data, Chrome and IE respond very quickly with the same jquery code for table effects.

The main code is as follows:



Reply content:

Recently, try to develop a simple online report with the following basic workflow:

index.html page has a DIV element, id= "div_result", the default does not have any content;
The index.html page has a jquery code that uses $.get () to send a request to /test.php , returning the contents of a table's HTML code, using $ ("#div_ Result"). The HTML () output is in the div element of the current page.

The returned HTML code (table) contains the jquery code, which is the function of the table style (interlaced color, select row highlighting).

Problems that arise:
In Chrome : Quickly move the mouse over the table and select the highlight effect in the row to respond very quickly.
In all IE browsers: The above effects appear with noticeable lag, regardless of the number of table rows.

Stop $ ("Div_result"). html (), manually add a static table below the div element in index.html and populate the test data, Chrome and IE respond very quickly with the same jquery code for table effects.

The main code is as follows:



  • 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.