Team:Glendale CC AZ/jquery

From 2013.igem.org

(Difference between revisions)
Line 1: Line 1:
-
<style type="text/css">
+
//binding click event on li elements to having good active element
-
 
+
$("li").click(function(){
-
@import url('http://fonts.googleapis.com/css?family=Lato');
+
   $("li").removeAttr("class");
-
 
+
   $(this).addClass("active");
-
* {
+
});
-
   margin: 0;
+
-
  padding: 0;
+
-
  box-sizing: border-box;
+
-
}
+
-
 
+
-
body {
+
-
  font: 14px/1 Lato, sans-serif;
+
-
  color: #555;
+
-
  background: #eee;
+
-
}
+
-
 
+
-
.gallery {
+
-
  width: 790px;
+
-
  margin: 0 auto;
+
-
  padding: 5px;
+
-
  background: #333;
+
-
}
+
-
 
+
-
.gallery > div {
+
-
  position: relative;
+
-
  float: left;
+
-
  padding: 5px;
+
-
}
+
-
 
+
-
.gallery > div > img {
+
-
  width: 250px;
+
-
  transition: .1s transform;
+
-
  transform: translateZ(0); /* hack */
+
-
}
+
-
 
+
-
.gallery > div:hover {
+
-
   z-index: 2;
+
-
}
+
-
 
+
-
.gallery > div:hover > img {
+
-
  transform: scale(1.5,1.5);
+
-
  transition: .3s transform;
+
-
}
+
-
 
+
-
.cf:before, .cf:after {
+
-
    display: table;
+
-
    content: "";
+
-
    line-height: 0;
+
-
}
+
-
 
+
-
.cf:after {
+
-
    clear: both;
+
-
}
+
-
 
+
-
h1 {
+
-
  margin: 40px 0;
+
-
  font-size: 24px;
+
-
  text-align: center;
+
-
  text-transform: uppercase;
+
-
}
+
-
 
+
-
footer {
+
-
  margin: 80px 0;
+
-
  text-align: center;
+
-
}
+
-
 
+
-
</style>
+

Revision as of 03:58, 27 August 2013

//binding click event on li elements to having good active element $("li").click(function(){

 $("li").removeAttr("class");
 $(this).addClass("active");

});