我需要我的jQuery腳本幫助,顯示鼠標懸停時和.conceptcontent
上課的時候img
變化,當鼠標離開img
改回,但我可以隱藏.conceptcontent
類?JQuery的懸停IMG調劑,鼠標移出
(function ($) {
$(".img-swap").hover(
function() {
this.src = this.src.replace("_off", "_on");
$(".conceptcontent").show("slow");
},
function() {
this.src = this.src.replace("_on", "_off");
});
var imgSwap = []; $(".img-swap").each(function() {
imgUrl = this.src.replace("_off", "_on");
imgSwap.push(imgUrl);
});
$(imgSwap).preload();
})(jQuery);
HTML
<title>Untitled Document</title>
</head>
<body>
<!--background-->
<div id="intro">
<h1 id="rubrik">Josef Carlsson</h1>
</div>
<div class="meny">
<div id="home"><img src="iconer/home_off.svg" class="img-swap"></div>
<div id="about"><img src="iconer/ommig_off.svg" class="img-swap"></div>
<div id="design"><img src="iconer/design_off.svg" class="img-swap"></div>
<div id="internet"><img src="iconer/internet_off.svg" class="img-swap"></div>
<div id="camera"><img src="iconer/kamera_off.svg" class="img-swap"></div>
<div id="concept"><img src="iconer/koncept_off.svg" class="img-swap"></div>
</div>
<div class="menytext">
<div id="hometext">Start</div>
<div id="abouttext">About me</div>
<div id="designtext">Design</div>
<div id="internettext">Webb</div>
<div id="cameratext">Pictures</div>
<div id="concepttext">Concepts</div>
</div>
<ul class="conceptcontent">
<li>emotion</li>
<li>[in]sight</li>
<li>will i make it</li>
<li>trace</li>
<li>datemate</li>
<li>pacman</li>
</ul>
這是HTML,這些會用來
你能告訴我們html嗎? – dewyze 2013-04-10 19:57:55