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 6839451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:43:14+00:00 2026-05-26T23:43:14+00:00

I need some help: I have three separate JQM pages – page1.html, page2.html and

  • 0

I need some help:

  • I have three separate JQM pages – page1.html, page2.html and page3.html.
  • I’m adding my .js files to all pages, so whichever page is loaded first also loads the plugin
  • page2.html has a trigger called data-somesome=”true” to fire the plugin on page2
  • I have added a listener that waits for the trigger page to be created

Looks like this:

(function($,window){
   $.widget("mobile.somesome",$.mobile.widget, {
      _create: function() { 
          var self = this;
          console.log("here we go");
          ...
          }
   });
   // initialize
   var trigger = $('div:jqmData(somesome="true")').live( 'pagecreate',function(event){ 
   if ($('html').data('somesome-init', 'Off')) {
        $('html').data('somesome-init', 'On')
        console.log("trigger fired");
        trigger.somesome();
        }
    });
}) (jQuery,this);

Problem:
If I load page2.html directly, everything works as normal = console logs the trigger has been fired and the plugin runs.

However, if I start on either page1.html or page3.html and then call page2.html hoping the plugin would fire, I only get the console “trigger fired”, so I’m detecting correct, but the plugin itself doesn’t run.

Can anybody give me a hint?

EDIT
Added some examples:
– page2 direct load this directly, and the color changes to red
– via page1 start from here, then go to page2, nothing happens
– via page3 or start from here and go to page2, also nothing happens

  • 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-26T23:43:15+00:00Added an answer on May 26, 2026 at 11:43 pm

    $(this) makes it work… like so:

    var trigger = $('div:jqmData(somesome="true")').live( 'pagecreate',function(event){ 
        if ($('html').data('some-init', 'Off')) {
            $('html').data('some-init', 'On')
                $( this ).somesome();
                }
         });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need some help from the shell-script gurus out there. I have a .txt
Need some help about with Memcache. I have created a class and want to
Need some help to solve this. I have a gridview and inside the gridview
Need some help from javascript gurus. I have one page where http://www.google.com/finance/converter is embedded
Need some help, please. I have a line of horizontal thumbnails loaded as ONE
I need some help with a work project I have been assigned. At the
I need some help about WCF and authorization. Currently I have a client which
I need some help in solving this problem. We have a large amount of
I need some help with an array and a foreach loop, I have an
I need some help about RegExp in AS3. I have a simple pattern :

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.