Personally, the code is very streamlined in some ways. But in the day-to-day coding process, especially with the cooperation of many people, this code may cause some trouble to other developers.
As Xiao Ma says, if certain frameworks are already in use, specific problems need to be analyzed. For example, the above conditions to judge the code, using the YUI code can be used
YAHOO.util.Dom.hasClass (el, ClassName)
is more streamlined and easier to understand than the code above.
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.