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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:10:36+00:00 2026-05-24T01:10:36+00:00

i have a nested buttons and im trying to add click events on it

  • 0

i have a nested buttons and im trying to add click events on it but it seems not to be working.

this is my object

<div id="ui-50">
<div class="ui-rpc" data-role="controlgroup" data-type="horizontal" >
    <input type="button" id="rpc-bor" value="<<" />
    <input type="button" id="rpc-back"  value="<" />
    <span style="margin:3px"></span>
    <input type="text" id="rpc-jump" value=""  />
    <input type="button" id="rpc-next" value=">" />
    <input type="button" id="rpc-eor" value=">>" />
    <span style="margin:20px"></span>
    <label id="rpc-current" >0</label>
    <label id="rpc-separator" >/</label>
    <label id="rpc-total" >0</label>
    <span style="margin:20px"></span>
    <label id="rpc-rpp" >0</label>
</div>
</div>

im trying to add click event on id=”rpc-eor” button using

$("#ui-50 .ui-rpc #rpc-eor").click(function(){
    alert("yay!");
});

but the event wont fire. what is the matter? please help! thanks in advance

  • 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-24T01:10:36+00:00Added an answer on May 24, 2026 at 1:10 am

    I am seeing the console.log output as expected in this demo I ran in Chrome, using jQuery.mobile 1.0b1

    <!DOCTYPE html> 
    <html> 
      <head> 
         <title>Page Title</title> 
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css" />
        <script src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
        <script src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"></script>
        <script type="text/javascript">
        $(document).ready(function() {
            $("div:jqmData(role='page')").live('pageshow',function(){
                $("#ui-50 .ui-rpc #rpc-eor").click(function(){
                    console.log("yay!");
                });
            });
        });
        </script>
    </head> 
    <body>
    <div data-role="page" id="home">
        <div data-role="header">
           <h1>Header</h1>
        </div>
        <div data-role="content">
            <div id="ui-50">
                <div class="ui-rpc" data-role="controlgroup" data-type="horizontal" >
                    <input type="button" id="rpc-bor" value="<<" />
                    <input type="button" id="rpc-back"  value="<" />
                    <span style="margin:3px"></span>
                    <input type="text" id="rpc-jump" value=""  />
                    <input type="button" id="rpc-next" value=">" />
                    <input type="button" id="rpc-eor" value=">>" />
                    <span style="margin:20px"></span>
                    <label id="rpc-current" >0</label>
                    <label id="rpc-separator" >/</label>
                    <label id="rpc-total" >0</label>
                    <span style="margin:20px"></span>
                    <label id="rpc-rpp" >0</label>
                </div>
            </div>
        </div>
    </div>
    </body>
    </html>
    

    Note: there is no document.ready() for jQuery.mobile so if you have wrapped the jQuery in just document.ready() then it might be causing your problem. It is better to bind on $("div:jqmData(role='page')").live('pageshow',...); to guarantee that the page is ready. That said, in this simple case it still works without the .live bind.

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

Sidebar

Related Questions

I have nested ajax calls that are not working in ie7. They work fine
I have some nested tables that I want to hide/show upon a click on
I have this massive nested loop scenario that is calling the DB and making
So I have a series of 2 nested ul's. When you click on the
I have a feeling I'm doing this horribly, horribly wrong. Nested for loops? What
I'm trying to create a chess game board with 8x8 buttons. I'm using nested
I have nested dictionaries: {'key0': {'attrs': {'entity': 'p', 'hash': '34nj3h43b4n3', 'id': '4130'}, u'key1': {'attrs':
I have nested xsl:for loops: <xsl:for-each select=/Root/A> <xsl:for-each select=/Root/B> <!-- Code --> </xsl:for> </xsl:for>
I keep finding that if I have nested divs inside each other, and one
as per the title; is it possible to have nested comments in valid HTML?

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.