如何在链接下方滑动切换(或在链接下方显示/隐藏)?

时间:2012-10-29 15:50:34

标签: jquery jquery-plugins

  

可能重复:
  Show/Hide span on the same spot

请查看我正在设计的此网页:http://www.mapisms.seas.gwu.edu/2.php

这里我有两个链接,当我点击它们中的每一个时,跨度标签出现在屏幕的左侧。但我希望他们每个人都出现在他们各自的链接下面。

<script type="text/javascript">
$(document).ready(function(){
    $(".slidingDiv").hide();
    $(".show_hide").show();

    $('.show_hide').click(function(){
    $(".slidingDiv").slideToggle();
    return false;
    });

    $(".slidingDiv1").hide();
    $(".show_hide1").show();

    $('.show_hide1').click(function(){
    $(".slidingDiv1").slideToggle();
    return false;
    });

});
</script>

并且标签是:

<a href="#" class="show_hide">Japan</a><span class="slidingDiv"><img src="02-1 ImageFiles/01 Japan.JPG" style="width:235px; height:245px;" /><a href="#" class="show_hide">Close</a></span> is made up of islands, regions, prefectures (government districts), cities, and surrounding communities. The main island, Honshu, has thirty-four prefectures making up five regions. The <a class="show_hide1" href="#">Tōhoku Region</a><span class="slidingDiv1"><img src="02-1 ImageFiles/02 TohokuRegion.JPG" style="width:217px; height:236px;" /><a href="#" class="show_hide1">Close</a></span>

0 个答案:

没有答案