0

私はこのコードを持っています. それで、私の質問は、最後の引用が使用された後、最初の引用にスキップして戻るにはどうすればよいかということです。ありがとうございました。(mapsbyphil dot com で動作を確認できます)。

<div id="container">
<div>
 <p><b>"The early days of GIS were very lonely. No-one knew what it meant."</b><br><a href="http://en.wikipedia.org/wiki/Roger_Tomlinson"  target="_blank">Roger Tomlinson</a>, Father of GIS</p>
</div>
<div>
 <p><b>“GIS is a form of digital mapping technology.  Kind of like Google Earth, but better.”&lt;/b><br><a href="http://en.wikipedia.org/wiki/Arnold_Schwarzenegger"  target="_blank">Arnold Schwarzenegger</a>, Conference on California's Future 2008</p>
</div>
<div>
 <p><b>“I am told there are people who do not care for maps, and I find it hard to believe.”&lt;/b><br><a href="http://en.wikipedia.org/wiki/Robert_Louis_Stevenson"  target="_blank">Robert Louis Stevenson</a></p>
</div>
<div>
 <p><b>“Everything is related to everything else, but near things are more related than distant things.”&lt;/b><br><a href="http://en.wikipedia.org/wiki/Tobler%27s_first_law_of_geography"  target="_blank">Tobler's First Law of Geography</a></p>
</div>
<div>
 <p><b>"It is not down in any map; true places never are."</b><br><a href="http://en.wikipedia.org/wiki/Herman_melville"  target="_blank">Herman Melville</a></p>
</div>
<div>
 <p><b>"They were maps that lived, maps that one could study, frown over, and add to; maps, in short, that really meant something.” </b><br><a href="http://en.wikipedia.org/wiki/Gerald_Durrell"  target="_blank">Gerald Durrell</a></p>
</div>
<div>
 <p><b>“I get to go to overseas places, like Canada.” </b><br><a href="http://en.wikipedia.org/wiki/Britney_Spears"  target="_blank">Britney Spears</a></p>
</div>
<div>
 <p><b>“I like geography. I like to know where places are.” </b><br><a href="http://en.wikipedia.org/wiki/Tom_Felton"  target="_blank">Tom Felton</a></p>
</div>
<div>
 <p><b>"I have no idea where Italy is on the map, but I do know what shape it is, and its like a boot." </b><br><a href="http://en.wikipedia.org/wiki/Snooki"  target="_blank">Snooki</a></p>
</div>
<script type="text/javascript">
function InOut(elem)
{
elem.delay()
 .fadeIn(600)
 .delay(5000)
 .fadeOut(600,
     function(){
        if(elem.next().length > 0) 
          { InOut(elem.next()); }
        else
          { InOut(elem.siblings(':first')); }

      }
    );
}

$('#container div').hide();
InOut($('#container div:first'));
</script>
4

1 に答える 1

0

<script>最後の兄弟であるため、実際に見せようとしていると思います。<script>を の外側に配置することもできます<div id="container">

'div'または、セレクターをnext()関数に渡すことができます。

于 2013-03-06T14:52:45.713 に答える