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

  • SEARCH
  • Home
  • 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 7676695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:15:26+00:00 2026-05-31T17:15:26+00:00

Im new in jQuery so sure that i am doing something wrong :(. Matter

  • 0

Im new in jQuery so sure that i am doing something wrong :(. Matter is that i have a main page:

<html> 
<head> 
<title>My Page</title> 
<meta name="viewport" content="width=device-width, initial-scale=1"> 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>

<div data-role="header">
    <h1>My Title</h1>
</div><!-- /header -->

<div data-role="content">   
    <a href="pagina2.php">click me</a>
</div><!-- /content -->

inside this one I redirect to another page with a $(document).ready inside. the problem is that the “$(document).ready” doesn’t triggers until I manualy refresh the page, after this, everything works fine.

<html> 
<head> 
<title>My Page</title> 
<meta name="viewport" content="width=device-width, initial-scale=1"> 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>

<script type="text/javascript" src="jquery.js"></script>

$(document).ready(function(){
$(“p”).click(function(){
$(this).hide();
});
});

<div data-role="header">
    <h1>My Title</h1>
</div><!-- /header -->

<div data-role="content">   

<p>If you click on me, I will disappear.</p>
<p>Click me away!</p>
<p>Click me too!</p>

</div><!-- /content -->

should I redirect whithout an href or maybe im doing something wrong ??

Pd: sorry for my inglish 🙂

  • 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-31T17:15:27+00:00Added an answer on May 31, 2026 at 5:15 pm

    With jQuery mobile secondary pages are loaded asynchronously and javascript in those pages will not be executed.

    You should include all your javascript code in an external script and link that script in the head of your initial page.

    btw; there is detailed info on all this in the docs see: http://jquerymobile.com/demos/1.1.0-rc.1/docs/pages/page-scripting.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have application that brings response via Ajax and creates 5-20 new jQuery click
I'm having a really irritating problem doing something that I'm sure I've done before.
I have a web page that is using JQuery to communicate with the backend.
I have an IE bug that I'm not sure how to fix. Using jQuery
I am sure this is probably something simple that i am not doing. Running
When writing a new jQuery plugin is there a straightforward way of checking that
I'm using JQuery to set the HTML inside a div. Something like this: $(div).html(strHtmlBlob);
First off, the jQuery datepicker works fine with classes when doing a fresh page
Here is the code i have and its doing something, just not what i
I'm new to jQuery and have tried looking around for an answer on how

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.