This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
img{ | |
border-radius:10px; | |
} | |
</style> | |
<img src="xx.jpg"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul> | |
<li>item1</li> | |
<li class="active">item2</li> | |
<li>item3</li> | |
</ul> | |
<script> | |
$(ul).find(".active").index(); //return 1 | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var array = ["lily", "tom", "lucy"]; | |
var ele1 = "lily"; | |
var ele2 = "lucy"; | |
var ele3 = "jack"; | |
array.indexOf(ele1); // return 0 | |
array.indexOf(ele2); // return 2 | |
array.indexOf(ele3); //return -1; NOTE: element is not in the array if return -1 |
NewerOlder