Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6982663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:19:07+00:00 2026-05-27T18:19:07+00:00

I have created a sample web application using jQuery Mobile. I have created two

  • 0

I have created a sample web application using jQuery Mobile.

I have created two <div>s; one contains href and another contains the content. When I click on HREF It showing jquery-mobile script Error as like below:

Error Loading Page

Can anybody see what might be causing this error?

    <html> <head runat="server">    <title>How to expand collapse div layer using jQuery</title>
           <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.min.js"></script>    <script type="text/javascript" src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-.0a3.min.js"></script> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-.0a3.min.css" />    
   <script language="javascript">
       $(document).ready(function () {
       var $pages = $('#pages > *').hide(); 
           $('#content a').click(function() {
                $pages.hide();
                $($(this).attr('href') ).show();
            });
       });
   </script>
</head>
<body>  
   <div data-role="page">
   <div data-role="header" class='header_align'>Bristol-Myers Squibb</div>

       <h2>
           How to expand collapse div layer using jQuery</h2>
       <div id="toggle">
           <div id="heading">Heading</div>
           <div id="content">
              <ul>
                 <li><a href="#page-1">Page1</a></li>
                 <li><a href="#page-2">Page2</a></li>
                 <li><a href="#page-3">Page3</a></li>
              </ul>
           </div>
       </div>
       <div id="pages">
            <div id="page-1">Page 1 Content</div>
            <div id="page-2">Page 2 Content</div>
            <div id="page-3">Page 3 Content</div>
       </div>
     </div>    
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:19:08+00:00Added an answer on May 27, 2026 at 6:19 pm

    The jQuery mobile default behavior of a link with a named anchor is to jump to a page (data-role=”page”) with the respective id. But there is no such page for page-1, page-2 or page-3 so the error occurs.

    Try this

    $(document).ready(function () {
        var $pages = $('#pages > *').hide(); 
        $('#content a').click(function() {
            $pages.hide();
            $($(this).attr('href') ).show();
            return false;
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a sample project using ASP.NET MVC 3 Web Application (Razor) template.
I have created a new MVC2 project using the ASP.NET MVC2 Web Application, which
I have created a sample web application in Visual Studio 2010. It stores Membership
I have created a simple java web (Vaadin) application project using JPA and it
Could someone help me on this, I have created simple web services using axis2
I have created a simple web browser using c# and I want to block
I have created a simple web-service using Java. i want to load jars related
I have created some simple app in Java, and 'deployed' it using Java Web
I have created a sample java socket application. I used Socket s = new
I just created a sample MVC3 application to learn validation. It is using DataAnnotations.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.