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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:41:14+00:00 2026-06-04T23:41:14+00:00

I have a problem with the listview in jquery mobile. I want to load

  • 0

I have a problem with the listview in jquery mobile. I want to load some data from a server using JSON and fill thy listview with the items. That works fine. But when I am trying to react on a click on a new loaded item I do net get the event! I think I have to refresh the view somehow, bit do not know how.

I made a little sketch on http://jsfiddle.net/VqULm/227/

when u hit the click me button the click event on a item isn’t tracked anymore. How do i get the “Wokrs” alert on the new items?

Thank u very much for reading!

  • 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-06-04T23:41:16+00:00Added an answer on June 4, 2026 at 11:41 pm

    Try

        $('#listview').on('click', 'li', function() {
            alert("Works"); // id of clicked li by directly accessing DOMElement property
        });
    

    with jQuery > 1.7

    DEMO

    OR

    $('#listview li').live('click', function() {
        alert("Works"); // id of clicked li by directly accessing DOMElement property
    });
    

    with your jQuery version 1.6.4.

    DEMO

    why you need this

    Because. you’re adding li within listview after page reload, so any event for those lis should live (for jQuery version you used) or delegate (jQuery > 1.7).

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

Sidebar

Related Questions

I have facing problem in listview i am getting data from server and after
In jQueryMobile, I have written a data-role=listview component and I want to filter the
I have the following jQuery Mobile HTML code, the navbar's content is set using
i have problem getting text from edittext inside listview when im in last edittext
I'm trying to show some user info in a listview in jquery mobile. I'm
I have problem when i using ListView and Linq as datasource. The error down:
I'm building a mobile web app with jQuery Mobile and I have a problem.
I have create dynamic listview based on database but the problem is to load
I have a problem on refresh the listview using thread. How to use it
I have a problem that i have a listview for many data items, it

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.