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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:57:29+00:00 2026-06-02T14:57:29+00:00

I Am trying to fill jquery mobile listivew using knockoutjs library, but my problem

  • 0

I Am trying to fill jquery mobile listivew using knockoutjs library, but my problem is the header of the list view(list-divider) is is repeated. I was wondering how to solve this issue,

this is my code and thanks for help.

<!DOCTYPE html> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"> 
<meta name="apple-mobile-web-app-capable" content="yes"> 
<meta name="apple-mobile-web-app-status-bar-style" content="black"> 

<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 src="http://cloud.github.com/downloads/SteveSanderson/knockout/knockout-2.0.0.js" type="text/javascript"></script>




</head> 
<body> 

 <div data-role="page">
    <div data-role="header">
        <h1>Header</h1>
    </div>
    <div data-role="content">
          <ul data-role="listview" data-inset="true" data-bind="foreach:seats"  data-theme="b"  data-filter="true"
            >
                <li data-role="list-divider">List </li>

        <li>
            <a  href="#" ><span  data-bind="text:reservationId"></span></a>

        </li>

    </ul>
    </div>

 </div>
 <script type="text/javascript">


function Reservation(reservationId, covers) {

    var self = this;
    self.reservationId = reservationId;
    self.covers = covers;

}

function ReservationsViewModel()
{
 var self = this;   
self.seats = ko.observableArray();

self.fillReservations=function()
{   

var mydata={
             "result":[
     {
         "reservationId": "23424574367436523452345",
         "covers"       : "4"
      },
      {
         "reservationId": "23424574367436523452345",
         "covers"       : "4"

     }
]  
  };                    

 $.each(mydata.result, function (index, value) {                 
      self.seats.push(new Reservation(this.reservationId,this.covers));
    });


}//End fillReservations
self.fillReservations();
}// End ReservationsViewModel

ko.applyBindings(new ReservationsViewModel());      
    </script>  

</body> 

</html> 

Thanks for help.

  • 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-02T14:57:31+00:00Added an answer on June 2, 2026 at 2:57 pm

    I solved my problem by using containerless control flow syntax.

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

Sidebar

Related Questions

I am trying to fill object[] with List<string> but I cannot figure out how
I'm trying to load fragments of XHTML markup using jQuery's $.fn.load function, but it
I am trying to fill a text box with the system date using jquery.
I'm trying to build a list of checkboxes by using jQuery.tmpl It'll list an
I'm trying to fill a torus texture of wood, but leaves only one color:
I'm trying to build DOM with jQuery and fill it with data that is
I'm trying to increment through JQuery loop to fill out some HTML code with
I'm trying to use jQuery to fill in a form in an iFrame. Do
I am using jQuery 1.3.2, and I'm trying to select some elements in an
Trying to do a simple web app with jquery mobile. I have put together

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.