How to show html pages when a jquery tab is selected?

I am starting using Jquery and I need some help with tabs. I need to create 4 tabs that will show 4 different html pages. For example,  tab 1 will show  page1.html   tab 2 will show page2.html, etc. I am using jsp also.

I have
  <script type="text/javascript">

      <div id="tabs">
                        <li><a href="#tabs-1">tab1</a></li>
                        <li><a href="#tabs-2">tab2l</a></li>
                        <li><a href="#tabs-3">tab3</a></li>
                        <li><a href="#tabs-4">tab4</a></li>
                  <div id="tabs-1"> want to show page1.html  </div>
                  <div id="tabs-2"> want to show page2.html   </div>
                  <div id="tabs-3"> want to show page3.html   </div>
                  <div id="tabs-4">  want to show page4.html   </div>
                  <div id="tabs-5">  want to show page5.html  </div>

How can I do it, can you please help? Thanks in advance!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shahzad Fateh AliSoftware ArchitectCommented:

You can do it by fetching the pages via ajax. Read this

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Here you have very easy to understand code for what you need (files attached). I use it as my template every time I need it.
you can try your own here but the basic is something like
<script type="text/javascript">
            $(document).ready(function() {
                $("#tabs").click(function() {
                    if ($("#tabs-1").is(":visible")) {
                    } else {

Open in new window

elrenacentistaAuthor Commented:
hi experts,

 thanks for your help I used the link  shahzadfatehali shared and it worked as I wanted. Thanks

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.