Home > Web Front-end > JS Tutorial > JS missing identifier error under IE_jquery

JS missing identifier error under IE_jquery

WBOY
Release: 2016-05-16 16:41:16
Original
1397 people have browsed it

Looking up the source code based on the number of error lines, I can’t see where there is a problem. It seems like there is nothing missing. The code is as follows:

if (opts.display.class != '') {
  $(list).addClass(opts.display.css);
}
Copy after login

This sentence is actually to determine whether the class attribute of the display of the opts object has a value, otherwise it will be processed accordingly. Grammatically speaking, it is correct. After searching online, I found that IE has relatively different requirements for JS syntax. Harsh, because the class in it is a keyword of js. If you use this as a variable, IE will report the above error, alas!

Since this is a plug-in for jQuery, fortunately there are not many changes, as long as the names of the variables that use this attribute are changed.

Let me introduce this plug-in casually. It feels quite good. This plug-in is called imList, which can help you generate HTML elements and codes in batches. It also has a very rich regular template replacement function, which is suitable for interacting with the server. When the corresponding HTML interface is dynamically generated, interested friends can go to its official website for details

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

Related labels:
js
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