我有一個頁面,我想在不刷新我的頁面的情況下重新加載Div,當我點擊菜單鏈接時,此時我正在使用以下內容,但它沒有工作:使用jquery/ajax重新加載Div的內容
$(".hidemenubook4").load(location.href + " #book4");
我的頁面有,我想重裝當我點擊鏈接打開它們4周不同的div:
<a class="hidemenubook1" id="launcherbook1b" data-fancybox-group="book1" href="javascript:void(0);"><span class="namebook1origin">Book1</span></a>
<a class="hidemenubook2" id="launcherbook2b" data-fancybox-group="book2" href="javascript:void(0);"><span class="namebook2origin">Book2</span></a><br/>
<a class="hidemenubook3" id="launcherbook3b" data-fancybox-group="book3" href="javascript:void(0);"><span class="namebook3origin">Book3</span></a><br/>
<a class="hidemenubook4" id="launcherbook4b" data-fancybox-group="book4" href="javascript:void(0);" onClick="parent.jQuery.fancybox.close();"><span class="namebook4origin">Book4</span></a><br/>
<div id="book1"><div class="thumbnails">
<a class="fancyboxgallerybook4" data-fancybox-group="book4" href="http://www.domaine.com/wp-content/uploads/book0/4.jpg" title=""><img class="fancyboxthumbnailsgallerybook4" src="http://www.domaine.com/wp-content/uploads/book4/07.jpg" alt=""/></a>
...
</div></div>
<div id="book2"><div class="thumbnails">
<a class="fancyboxgallerybook4" data-fancybox-group="book4" href="http://www.domaine.com/wp-content/uploads/book0/4.jpg" title=""><img class="fancyboxthumbnailsgallerybook4" src="http://www.domaine.com/wp-content/uploads/book4/07.jpg" alt=""/></a>
...
</div></div>
<div id="book3"><div class="thumbnails">
<a class="fancyboxgallerybook4" data-fancybox-group="book4" href="http://www.domaine.com/wp-content/uploads/book0/4.jpg" title=""><img class="fancyboxthumbnailsgallerybook4" src="http://www.domaine.com/wp-content/uploads/book4/07.jpg" alt=""/></a>
...
</div></div>
<div id="book4"><div class="thumbnails">
<a class="fancyboxgallerybook4" data-fancybox-group="book4" href="http://www.domaine.com/wp-content/uploads/book0/4.jpg" title=""><img class="fancyboxthumbnailsgallerybook4" src="http://www.domaine.com/wp-content/uploads/book4/07.jpg" alt=""/></a>
...
</div></div>
的可能的複製[刷新/使用jquery重新加載股利內容/ AJAX](http://stackoverflow.com/questions/18490026/refresh-reload-the-content-in-div-using-jquery -ajax) –
很好的評論,但我怎麼能在我的情況下使用它? – clodo0683