how to know whether an element has an class
2008-09-26 12:05
507 查看
use the function hasClass to know whether an element has an class
example:
//store state in cookie
if(li.hasClass(CLASSES.open)){
TreeState = false;
}else{
TreeState = true;
}
example:
//store state in cookie
if(li.hasClass(CLASSES.open)){
TreeState = false;
}else{
TreeState = true;
}
相关文章推荐
- How to get the MouseEvent coordinates for an element that has CSS3 Transform?
- How to get the MouseEvent coordinates for an element that has CSS3 Transform?
- How to get the MouseEvent coordinates for an element that has CSS3 Transform?
- how to know wether an element is exist in a html page.
- How to restore an element that has been deleted in CCRC?
- how to know how many objects a class has generated?
- how to remove an element in lxml
- How To Detect If an Application Has Stopped Responding
- How To Programmatically Copy an IMG Element to the Clipboard
- How to Create an Application that has Office Style
- How to determine the size of an object of class?
- How To Programmatically Copy an IMG Element to the Clipboard
- How to check whether XPCOM has been registered successfully
- How to know what an HRESULT code means?
- How to judge whether an array is empty?
- How does Gradle know whether to do a single or multiproject build?
- How can selenium web driver get to know when the new window has opened and then resume its execution
- How to write an immutable Class?
- How To Detect If an Application Has Stopped Responding
- How to know whether the attribute belongs to one types of productin Magento?