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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:00:51+00:00 2026-06-16T01:00:51+00:00

I am starting to learn HTML5 and CSS (with Jquery Mobile), and because I

  • 0

I am starting to learn HTML5 and CSS (with Jquery Mobile), and because I do not have much background in this area, I am stuck at something very easy.
I want to put a checkbox in a listview (at each li).
How can I do it in order to look like that :
http://a4.mzstatic.com/us/r1000/095/Purple/ff/1d/33/mzl.ecpvufek.320×480-75.jpg
(I mean that the checkbox is at the left of the others text and all).

For the moment, my code is : http://jsfiddle.net/AzN7S/
And as you can see the checkbox is above the text, and even with a div with a float:left in the second li, it doesn’t work 🙁

Can you help me please ?
Thank you very much beforehand for your answer, and sorry for my english ^^

Have a great day.

Olivier.

EDIT :

I finally succeeded in adding a checkbox at the left of the the right part.
I updated my example : http://jsfiddle.net/AzN7S/2/
I do not know if it is the right method, but it works 🙂

  • 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-16T01:00:52+00:00Added an answer on June 16, 2026 at 1:00 am

    i rethought my old answer and re did the issue especially to fit the mvc 4 framework but the client side is all the same.
    so lets start:
    if you just want the html you can get it here
    this link is to a 3 parts checkbox list, the checkbox, the link to the item and the info popup:

    Here is the link to jsfiddle for working listview with checkbox AND icon

    iv added at the end some 2 parts listbox and a single part, for any questions let me know.

    now for the controller all you need to do is

    [Authorize]
    public ActionResult Items(string act, 
        string tab, string search_by, string search, string sort, string sortdir, int? page, int? resultsPerPage,
        List<int> selected, int? projectId, string username)
    {
        if (act == "AddItemsToUser")
        {
            string response;
            if (selected != null)
            {
                response = "Project Items Added:";
                foreach (var item in selected)
                {
                    try
                    {
                        if (username != null)
                            if (UserItemRecordModel.InsertUserItem(username, item, null, null, 0, null, null))
                                response += item + " - inserted, ";
                    }
                    catch (Exception ex)
                    {
                        response += item + " - " + ex.Message + ", ";
                    }
                }
                response.TrimEnd(' ', ',');
            }
            else
            {
                response = "No Items Were Selected!";
            }
            return Json(response, JsonRequestBehavior.AllowGet);
        }
        else if (act == "AddItemsToProject")
        {
            string response;
            if (selected != null)
            {
                response = "Project Items Added:";
                foreach (var item in selected)
                {
                    try
                    {
                        if (projectId != null)
                            if (ProjectItemRecordModel.InsertProjectItem(projectId.ToString(), item, null, null, 0, null, null))
                                response += item + " - inserted, ";
                    }
                    catch (Exception ex)
                    {
                        response += item + " - " + ex.Message + ", ";
                    }
                }
                response.TrimEnd(' ', ',');
            }
            else
            {
                response = "No Items Were Selected!";
            }
            return Json(response, JsonRequestBehavior.AllowGet);
        }
        else if (act == "RemoveItemsFromUser")
        {
            string response;
            if (selected != null)
            {
                response = "Project Items Removed:";
                foreach (var item in selected)
                {
                    try
                    {
                        if (UserItemRecordModel.DeleteUserItem(username, item))
                            response += item + " - deleted, ";
                    }
                    catch (Exception ex)
                    {
                        response += item + " - " + ex.Message + ", ";
                    }
                }
                response.TrimEnd(' ', ',');
            }
            else
            {
                response = "No Items Were Selected!";
            }
            return Json(response, JsonRequestBehavior.AllowGet);
        }
        else if (act == "RemoveItemsFromProject")
        {
            string response;
            if (selected != null)
            {
                response = "Project Items Removed:";
                foreach (var item in selected)
                {
                    if (ProjectItemRecordModel.DeleteProjectItem(projectId.ToString(), item))
                        response += item + " - deleted, ";
                }
                response.TrimEnd(' ', ',');
            }
            else
            {
                response = "No Items Were Selected!";
            }
            return Json(response, JsonRequestBehavior.AllowGet);
        }
    
        List<ItemRecordModel> items = ItemRecordModel.GetSensors(search_by, search, sort, sortdir);
        return View("Items", new AdminRecordsViewModel() { Records = items });
    }
    

    this was my old answer:
    i solved your problem you need to change some stuff but you can accomplish a searchable listview with checkbox like so:

    jsfiddle example:


    basic:
    basic jsfiddle version

    nicer version:
    nicer version

    jquery mobile listview with checkbox and icon or image

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

Sidebar

Related Questions

I'm just starting to learn jQuery and I'm not sure how to enable a
I am starting to learn Ruby on Rails but have been stuck at the
I am just starting to learn jQuery and have gotten some of the basic
I'm horrible at jQuery, just starting to learn. I have a menu structure that's
i am new to phonegap and html5 appplication development,i am starting to learn html5
Starting to learn Canvas and have two classes so far (main one to call
I'm starting to learn Haskell and I've heard that many Haskell compilers have especially
I am just starting to learn how to use RMI, and I have a
I'm starting to learn OOP in JS and I came across this issue where
I'm just starting to learn AspectJ, and I have use-case for say, User login.

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.