Skip to content

Instantly share code, notes, and snippets.

@Arguseye
Last active December 21, 2015 02:59
Show Gist options
  • Select an option

  • Save Arguseye/6238608 to your computer and use it in GitHub Desktop.

Select an option

Save Arguseye/6238608 to your computer and use it in GitHub Desktop.
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
ul{
list-style-type:none;
width:300px;
}
ul li.item{
background-color:#FFCCCC;
margin-top:5px;
height:25px;
}
ul li.active{
background-color:#FF8888;
}
<!-- content to be placed inside <body>…</body> -->
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<ul>
<li class="item active">javascript</li>
<li class="item">css</li>
<li class="item">html5</li>
</ul>
<script>
$(document).ready(function(){
$(".item").hover(function(){
$(this).addClass("active");
},function(){
$(this).removeClass("active");
});
})
</script>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"html"}
@Arguseye
Copy link
Author

hover to change item liste style

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment