图像悬停在两张图像上不起作用

时间:2012-05-30 14:54:50

标签: javascript jquery html css

我在http://www.innexdesign.co.uk有一个完全有效的网站。在主页上,您会注意到当您将鼠标悬停在主页上时,会出现一些悬停的字样。我已经将在Dreamweaver中创建的这个现有站点实现到基于.net的基于Umbraco的CMS。

无论如何,我已经启动并运行该网站,但出于某些原因,两个图像“架构”和“能量评估”不再徘徊在黑色中。其余的仍然可以正常工作。

    <div id="content">
<div id="homeleft">
    <ul class="menu">
    <li class="first"><a href="home.aspx">HOME</a></li>
    <li><a href="profile.aspx">PROFILE</a></li>
    <li><a href="designs.aspx">DESIGNS</a></li>
    <li><a href="testimonials.aspx">TESTIMONIALS</a></li>    
    <li class="last"><a href="contact.aspx">CONTACT</a></li>
    </ul>
    <p style="text-align:center; font-weight:bold;">CELEBRATING<br /><span style="font-size:22px">21</span><br />YEARS<br />1991-2012</p>
    </div>
<div id="homeright">
  <a class="various1" href="#architecture" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Architecture','',/Images/architectureBLACK.png',1)"><img src="/Images/architecture.png" alt="Architecture" width="195" height="31" id="Architecture" style="padding:0px 20px;float:left;"/></a>
  <a class="various1" href="#idesign" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('interiordesign','','/Images/interior-designBLACK.png',1)"><img src="/Images/interior-design.png" alt="Interior Design" width="195" height="31" id="interiordesign" style="padding:0px 0px 5px 20px; float:right;"/></a>
  <a class="various1" href="#pmanage" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Projman','','/Images/project-managementBLACK.png',1)"><img src="/Images/project-management.png" alt="Project Managment" width="195" height="31" id="Projman" style="padding:20px 42px 5px 20px;float:left;"/></a>
  <a class="various1" href="#planning" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Planning','','/Images/PlanningBLACK.png',1)"><img src="/Images/Planning.png" alt="Planning" width="195" height="31" id="Planning" style="padding:10px 12px 5px 0px;float:right;"/></a>
  <a class="various1" href="#energy" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Energy Assessment','','/Images/energy-assessmentsBLACK.png',1)"><img src="/Images/energy-assessments.png" alt="Energy Assessments" width="195" height="31" id="EnergyAssessment" style="padding:0px 42px 0px 20px;float:right;"/></a>
  <a class="various1" href="#surveying" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Surveying','','/Images/SurveyingBLACK.png',1)"><img src="/Images/Surveying.png" alt="Surveying" width="195" height="31" id="Surveying" style="padding:10px;float:left;" /></a>
  <a class="various1" href="#cost" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('CostManagement','','/Images/cost-managementBLACK.png',1)"><img src="/Images/cost-management.png" alt="Cost Management" width="195" height="31" id="CostManagement" style="padding:0px 12px 0px 20px; float:left;"/></a>
  <a class="various1" href="#land" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('landscape','','/Images/landscape-architectureBLACK.png',1)"><img src="images/Landscape-Architecture.png" alt="Landscape Architecture" width="195" height="31" id="landscape" style="padding:20px 0px 0px 20px; float:right;" /></a>
  <div id="various1"> <a href="http://www.innexdevelopments.co.uk" target="_blank"  onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('DesignBuild','','/Images/DESIGNANDBUILDBLACK.png',1)"><img src="/Images/DESIGNANDBUILD.png" alt="Design and Build" width="195" height="31" id="DesignBuild" style="padding:10px 0 0 0px;float:left;"/></a>
</div>
<div style="display:none"><div id="architecture">
<img src="/media/52/architecture.png" width="195" height="31" alt="Architecture" />
<p style="padding:0px 0px 5px 0px; width:500px;">From a house extension or housing estate, to commercial warehouses’, leisure centres and bars, Innex Design can help develop any idea into a practical, ethical, sustainable reality.</p>    
</div></div>

<div style="display:none"><div id="idesign">
<img src="/media/441/interior-design.png" width="195" height="31" alt="Interior Design" />
<p style="padding:0px 0px 5px 0px; width:500px;">Innex Design’s Interior and brand development designers are experts in spatial design, brand development and awareness, signage and menu design all of which is complimented with the interior design package delivered.</p>    
</div></div>
<div style="display:none"><div id="pmanage">
<img src="/media/727/project-management.png" width="195" height="31" alt="Project Management" />
<p style="padding:0px 0px 5px 0px; width:500px;">Many of our architectural and interior design developments are project managed ensuring the brief and end aim is delivered on time and on budget. Only with project management can we ensure our clients that the specification and quality is to the highest standard.</p>
</div></div>
<div style="display:none"><div id="planning">
<img src="/media/709/Planning.png" width="195" height="31" alt="Planning" />
<p style="padding:0px 0px 5px 0px; width:500px;">Innex Design undertake all planning application submissions from residential, commercial, listed and conservation area consents, national park along with Display of Advertisement applications. We also work with planning consultants to add value for developers and lenders by assessing land and building use potential.</p>
</div></div>
<div style="display:none"><div id="energy">
<img src="/media/328/energy-assessments.png" width="195" height="31" alt="Energy Assessments" />
<p style="padding:0px 0px 5px 0px; width:500px;">Innex Design can assist with providing full building services design and energy consultancy, and through one of our partners BREEAM assessment, Commercial EPC, Domestic EPC, Display energy certificates, New Build SAP or SBEM reports and Sustainability statements.</p>
</div></div>
<div style="display:none"><div id="surveying">
<img src="/media/917/Surveying.png" width="195" height="31" alt="Surveying" />
<p style="padding:0px 0px 5px 0px; width:500px;">Innex Design can provide a wide variety of surveys from measured and condition surveys of buildings, Topographical surveys, Structural surveys, Party Wall surveys, and provide assistance with Asbestos surveys, Land/Probate surveys, certification and many more.</p>
</div></div>

<div style="display:none"><div id="cost">
<img src="/media/248/cost-management.png" width="195" height="31" alt="Cost Management" />
<p style="padding:0px 0px 5px 0px; width:500px;">Innex Design offer all clients a comprehensive service that removes the burden of day to day costs-related issues.</p>
</div></div>
<div style="display:none"><div id="land">
<img src="/media/501/Landscape-Architecture.png" width="195" height="31" alt="Landscape Architecture" />
<p style="padding:0px 0px 5px 0px; width:500px;">We undertake all aspects of landscape architecture, from landscape master planning, conceptual design through to detailed planting schemes. We adopt a fresh approach to the design of each project where a high degree of design flair and innovation comes as standard. </p>
</div></div>
<div style="display:none"><div id="build">
<img src="/Images/DESIGNANDBUILD.png" width="195" height="31" alt="Design and Build" />
<p style="padding:0px 0px 5px 0px; width:500px;">In today’s industry and marketplace some clients prefer a one point of contact approach to projects, with this in mind we have developed a nationwide network of partnering contractors to enable clients to have the one point contact, whilst ensuring delivery of excellent quality and standards of workmanship.</p>
</div></div>
  </div>
</div><!-- end content -->
</div><!-- end wrapper -->

知道为什么它会突然这样做吗?

所以这两行:

<a class="various1" href="#architecture" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Architecture','',/Images/architectureBLACK.png',1)"><img src="/Images/architecture.png" alt="Architecture" width="195" height="31" id="Architecture" style="padding:0px 20px;float:left;"/></a>

<a class="various1" href="#energy" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Energy Assessment','','/Images/energy-assessmentsBLACK.png',1)"><img src="/Images/energy-assessments.png" alt="Energy Assessments" width="195" height="31" id="EnergyAssessment" style="padding:0px 42px 0px 20px;float:right;"/><

/ A&GT;

2 个答案:

答案 0 :(得分:1)

由于文件夹结构区分大小写,因此您在图像路径中出错。而不是

MM_swapImage('Energy Assessment','','/Images/energy-assessmentsBLACK.png',1)

请尝试

MM_swapImage('Energy Assessment','','/images/energy-assessmentsBLACK.png',1)

(注意'图像中未经大写的'i')

编辑:

此外,您在通话中提供的身份证明是错误的,IMG元素的ID是“EnergyAssessment”而不是“能源评估”:

MM_swapImage('EnergyAssessment','','/images/energy-assessmentsBLACK.png',1)

答案 1 :(得分:0)

DiViS0R对于能量评估错误是正确的,因为&#39;架构&#39;你在第二个逗号后的函数调用中缺少一个语音标记

MM_swapImage('Architecture','',/Images/architectureBLACK.png',1)

应该是你的其他代码的外观

MM_swapImage('Architecture','','/Images/architectureBLACK.png',1)

希望有所帮助