Template:Lyon-INSA/homeCss
From 2012.igem.org
(Difference between revisions)
Line 286: | Line 286: | ||
<script> | <script> | ||
+ | var btnCLicked; | ||
$(".menuprinc").mouseout(function(){ | $(".menuprinc").mouseout(function(){ | ||
$(".menuprinc").css("background-position","-50px -50px"); | $(".menuprinc").css("background-position","-50px -50px"); | ||
+ | if ($(this).attr('id')==btnClicked) | ||
+ | { | ||
+ | $(this).mouseover(); | ||
+ | } | ||
}); | }); | ||
Line 312: | Line 317: | ||
$("#teamtown").click( | $("#teamtown").click( | ||
function(){ | function(){ | ||
+ | btnCLicked = $(this).attr('id'); | ||
$(".menuprinc").css("background-position","-50px -50px"); | $(".menuprinc").css("background-position","-50px -50px"); | ||
$(".sousMenu").hide(); | $(".sousMenu").hide(); | ||
Line 319: | Line 325: | ||
$("#project").click( | $("#project").click( | ||
function(){ | function(){ | ||
+ | btnCLicked = $(this).attr('id'); | ||
$(".menuprinc").css("background-position","-50px -50px"); | $(".menuprinc").css("background-position","-50px -50px"); | ||
$(".sousMenu").hide(); | $(".sousMenu").hide(); | ||
Line 326: | Line 333: | ||
$("#collaboration").click( | $("#collaboration").click( | ||
function(){ | function(){ | ||
+ | btnCLicked = $(this).attr('id'); | ||
$(".menuprinc").css("background-position","-50px -50px"); | $(".menuprinc").css("background-position","-50px -50px"); | ||
$(".sousMenu").hide(); | $(".sousMenu").hide(); | ||
Line 334: | Line 342: | ||
$("#lab").click( | $("#lab").click( | ||
function(){ | function(){ | ||
+ | btnCLicked = $(this).attr('id'); | ||
$(".menuprinc").css("background-position","-50px -50px"); | $(".menuprinc").css("background-position","-50px -50px"); | ||
$(".sousMenu").hide(); | $(".sousMenu").hide(); | ||
Line 342: | Line 351: | ||
$("#human").click( | $("#human").click( | ||
function(){ | function(){ | ||
+ | btnCLicked = $(this).attr('id'); | ||
$(".menuprinc").css("background-position","-50px -50px"); | $(".menuprinc").css("background-position","-50px -50px"); | ||
$(".sousMenu").hide(); | $(".sousMenu").hide(); | ||
Line 350: | Line 360: | ||
$("#result").click( | $("#result").click( | ||
function(){ | function(){ | ||
+ | btnCLicked = $(this).attr('id'); | ||
$(".menuprinc").css("background-position","-50px -50px"); | $(".menuprinc").css("background-position","-50px -50px"); | ||
$(".sousMenu").hide(); | $(".sousMenu").hide(); |
Revision as of 11:38, 20 October 2012