我正在尝试在单击链接时获取一个网页来更改 div#portfolioWork
内容,我尝试了一个以前在此处发布的脚本,但是没有这样的运气,即使在切换了要调用的 id 之后也是如此。
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script>
$('#GFXWork').click(function(){
$('#portfolioWork').load('portfolioContent.html #motionGraphics');
}
</script>
<nav id="portfolioNav">
<ul>
<li id="portfolio-compositing"><a href="#">Compositing</a></li>
<li id="portfolio-animation"><a href="#">Animation</a></li>
<li id="portfolio-motionGfx"><a id="GFXWork" href="#">Motion Graphics</a></li>
<li id="portfolio-3D"><a href="#">3D</a></li>
</ul>
</nav>
<div id="portfolioWork">
<div id='Portfolio3D'>
<a class="fancyYoutube" href="http://www.youtube.com/watch?v=rATNlIvsOWk">
<figcaption id="BikeRender">
<div class="captiontitle">3D Ident to Music</div>
<p class="maincaption">Apply attractive visuals to a short soundtrack to create an ident. Explore 3D particle systems and other simulation techniques to work towards the final outcome.</p>
<p class="captionFooter">Autodesk Maya and Adobe Photoshop were used.</p>
</figcaption>
<img src="Images/ident2Small.png"/></a>
<a class="fancyYoutube" href="Images/3DBikeLarge.png">
<figcaption id="BikeRender">
<div class="captiontitle">Rendering Techniques</div>
<p class="maincaption">Use reference materials to accurately texture a 3D bicycle model and light it to products standards. Composite the render outcomes to achieve quality images.</p>
<p class="captionFooter">Autodesk Maya and Adobe Photoshop were used.</p>
</figcaption>
<img src="Images/3DBikeSmall.png"/></a>
<a class="fancyChurch" rel="churchPoster" href="Images/PosterChurchLarge.png">
<figcaption id="ChurchRender">
<div class="captiontitle">Realistic Modelling</div>
<p class="maincaption">Gather reference materials in order to create a full 3D replica of a local building. Using a wide range of modelling techniques, add lights, textures and shaders for a complete effect.</p>
<p class="captionFooterChurch">Autodesk Maya and Adobe Photoshop were used.</p>
</figcaption>
<img src="Images/3DChurchSmall.png"/>
<a class="fancyChurch2" rel="churchPoster" href="Images/PosterChurch_AO.png">
</a>
</div> <!-- End of 3DWork -->
</div> <!-- End of PortfolioWork
我应该链接到一个名为portfolioContent.html 的html 文件,该文件位于portfolio.html 页面旁边的根文件夹中。
投资组合内容.html:
<div id="motionGraphics">
<a class="fancyYoutube" href="http://www.youtube.com/watch?v=rATNlIvsOWk">
<figcaption id="BikeRender">
<div class="captiontitle">3D Ident to Music</div>
</figcaption>
<img src="Images/ident2Small.png"/></a>
<a class="fancyYoutube" href="Images/3DBikeLarge.png">
<figcaption id="BikeRender">
<div class="captiontitle">Rendering Techniques</div>
<p>BLAAAAAAAAAAAH</p>
</figcaption>
<img src="Images/3DBikeSmall.png"/></a>
<a class="fancyChurch" rel="churchPoster" href="Images/PosterChurchLarge.png">
<figcaption id="ChurchRender">
<div class="captiontitle">Realistic Modelling</div>
<p class="maincaption">Gather reference materials in order to create a full 3D replica of a local building. Using a wide range of modelling techniques, add lights, textures and shaders for a complete effect.</p>
<p class="captionFooterChurch">Autodesk Maya and Adobe Photoshop were used.</p>
</figcaption>
<img src="Images/3DChurchSmall.png"/>
<a class="fancyChurch2" rel="churchPoster" href="Images/PosterChurch_AO.png">
</a>
</div> <!-- End of motionGraphcs -->
任何此类帮助将不胜感激,因为我现在完全不知道问题可能是什么!