How can I add a text box beside the label for checkbox using jquery mobile? It should be in one line (checkbox –> label (for checkbox) –> textbox)
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
If you want to add a label in the same line as its referencing element, like for example:
you may want to try using field containers, with
data-role="fieldcontain".For example:
The code above will give you:
Check the online doc for more information: http://jquerymobile.com/demos/1.1.1/docs/forms/checkboxes/
Now, if you want to several elements on one line (= several elements in different columns), I mean more than just a label and its element, you may wanna check the jQuery Mobile’s
Layout grids: http://jquerymobile.com/demos/1.1.1/docs/content/content-grids.htmlConsidering your example case, I think you may want to try to use a combination of the 2 methods above. So, you may try something like this:
Hope this helps.