私は3ページあります
1) index.aspx
2) schools.aspx
3) Classes.aspx
すべてのページには、そこのページに同じdivセクションがあります。以下のすべてのページに共通のDIVセクションを参照してください。ただし、テキストはページごとに異なります。
<div id="tab-container" class="tabs-container">
<div class="contentContainer">
<img width="275" height="220" title="" alt="" src="/99/english/images/fpoSquare.jpg" class="imgRight"></img>
<p class="destinationSectionHeader first">About Sydney</p><p>Learn English at a Kaplan International Colleges English school! We offer a variety of English courses at over 40 English schools in some of the world's most desirable locations in the UK, Ireland, Australia, New Zealand, USA, Canada and Malta.From fashionable city centre schools to schools on the campuses of prestigious universities, you can take an English course at a Kaplan International Colleges school in the environment that best suits you. All of our English schools provide our students with easy access to great resources and the local area's best cultural, social and historic attractions.
Study in the world-famous Empire State Building in New York, in a beautiful 7-storey art deco building next to the famous Cathedral Square in Christchurch, on Santa Barbara City College's impressive campus, in a historic building in London or in the heart of Sydney. You can have a look at all our schools and English courses by browsing through our website - so take your time and choose the English school that's right for you.</p>
</div>
</div>
インデックスページに他の2つのページ(Schools.aspxとClasses.aspx )へのリンクがあります。ユーザーがこれらのリンクをクリックすると、それらのページから取得したdiv id="tab-container"に基づいて上記のセクションが表示されます。以下のインデックスページのdivセクションに表示されます。
<div id="contents"></div>
AJAXとJQueryを使用してこの機能を実現する方法を提案してください。(AJAXを使用した解決策があるとよいでしょう)
ありがとう!
アップデート:
上記のすべてのリンク(学校、クラスなど)は以下のhtmlコードから来ています
ul class="tabHead tabs-nav">
<li class="tabLeftEnd"></li>
<li class="tabs-selected" id="tab-1">
<a class="load-fragment" href="/index.aspx"><span>Overview</span></a></li>
<li id="tab-2">
<a class="load-fragment" href="/schools.aspx"><span>Guide</span></a></li>
<li id="tab-3">
<a class="load-fragment" href="/classes.aspx"><span>Flight Schedule</span></a></li>
<li id="tab-4">
<a class="load-fragment" href="/specialOffers.aspx"><span>Special Offers</span></a></li>
<li id="tab-5">
<a class="load-fragment" href="/photo.aspx"><span>Photos</span></a></li>
<li class="tabRightEnd"></li>
</ul>
選択したliに「tabs-selected」というクラスがある場合は、「Marko Ivanovski」によって提案されたように、コードでクリックされたリンクに従ってこれを変更したいと思います。
再度、感謝します!