JS missing identifiers in IE _ jquery-js tutorial

Source: Internet
Author: User
When I used a jQuery plug-in today, I found that an error is always reported in IE, but it is normal in Firefox. The error is: the identifier is missing! You can find the source code based on the number of lines reported for the error. The Code is as follows:

If (opts. display. class! = '') {Response (list).addclass(opts.display.css );}

In fact, this sentence is used to determine whether the class attribute of the opts object's display has no value. Otherwise, it will be processed accordingly. The syntax is correct. Then I searched the internet, I found that IE had strict requirements on JS syntax, because the class is the js keyword. If I use this as a variable, IE will report the above error!

This is a jQuery plug-in. Fortunately, there are not many changes, as long as the variable names that use this attribute are changed.

I would like to introduce this plug-in here. It seems quite good. This plug-in is called imList, which can help you generate HTML elements and code in batches and has a rich array of regular template replacement functions, suitable for scenarios where you need to dynamically generate the corresponding HTML interface after interacting with the server. If you are interested, go to the official website to learn more.

Http://grasshopperpebbles.com/ajax/jquery-plugin-imlist/

Related Article

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.