jquery-mobile

jQuery Mobile buttons on same row as controlgroup

若如初见. 提交于 2019-12-13 03:58:41
问题 I have some html in a page. On the footer I want the Today and Refresh buttons to be on the same line as the control group, with the buttons left and right aligned and the controlgroup centered. Is there any easy way to do this with jQuery Mobile? <div data-role="page" id="display_appointments"> <div data-theme="a" data-role="header"> <a href="#" data-icon="delete">Menu</a> <h3> Appointments </h3> <a href="#" data-icon="delete">Add</a> </div> <div data-role="content"> Appointments here </div>

jQuery standard dropdown only stylizing on page load, hit refresh and its the ugly normal one

六月ゝ 毕业季﹏ 提交于 2019-12-13 03:55:07
问题 Trying to achieve the "drop down" effect I have on my form here once you click "add mileage and open it that is" it seems to only happen upon the first load, if you refresh or go back to the page at anytime the damn thing turns into an ugly normal non jquery drop down. im assuming its because im using javascript to populate my select (drop down). Any help would be appreciated....` .js // Create select element with options. function makeRunRecord() { var formTag = document.getElementsByTagName

Why does event on drag not have any effect with jQuery implementation?

[亡魂溺海] 提交于 2019-12-13 03:45:27
问题 I want to create a horizontal menu that is contained by 300px and items can be dragged horizontally if containment space is not enough. The implementation consists of jQuery 2.1.4. and jQuery mobile 1.4.5 and jQuery ui 1.12 Somehow the on drag event is not working, no errors at all, just not working. I tried a minimal example and it works, but my code in the implementation does not: https://codepen.io/anon/pen/YMaVyX Implementation: https://watchgurus.de HTML <div class="draggable"> <nav

How to remove the space between header and the page content in jquery?

夙愿已清 提交于 2019-12-13 03:44:51
问题 I would like to remove the space below the header and the first content , If you see the jsfiddle link . These is a space between the header "header" and "i'm list0" . I want to remove the space between them . So i have used margin-top:5px; for list, it doesn't work . so i tried for margin-bottom:-5px for header also ..It doesn;t work any case i have used. http://jsfiddle.net/WPpfZ/25/ 回答1: There's a 15px padding, not on the header or the list, but on the content div that's around both list

how to insert child elements into a listview?

北城余情 提交于 2019-12-13 03:35:46
问题 I have a UL listview. I want to insert LI elements into it via a function which spits out individual LIs. append() does not seem to work for me. Any suggestions? 回答1: You need to use .listview('refresh'); Working Example: http://jsfiddle.net/phillpafford/AfedX/2/ http://jsfiddle.net/phillpafford/AfedX/3/ (adding navigation to both pages) JS: $('#li-nav').append('<li><a href="#page2">Page 2</a></li>').listview('refresh'); HTML: <div data-role="page" id="home"> <div data-role="content"> <ul

Disabling a select from another select in jQuery Mobile

给你一囗甜甜゛ 提交于 2019-12-13 03:32:47
问题 I am developing an application in jQuery Mobile and in a form I have the following select <label for="estado_toma">Estado de la Toma</label> <select id="estado_toma" name="estado_toma" data-native-menu="false"> <option data-placeholder="true">Estado de la Toma</option> <option value="1">Buen Estado</option> <option value="2">Caja Dañada</option> <option value="3">Sin Tapa</option> <option value="4">No Hay</option> </select> I want to do that when you choose the no option other select disable

Click event not firing in jQuery Mobile?

故事扮演 提交于 2019-12-13 03:08:25
问题 See this fiddle: http://jsfiddle.net/Bg9Zx/5/ Relevant code: <fieldset data-role="controlgroup" data-type="horizontal" id="locate-me"> <input type="checkbox" name="loc" id="loc" /> <label for="loc">Locate me</label> </fieldset> $("#loc").click(function(){ alert('locate clicked!'); }); Why isn't the .click() event firing? Works perfectly fine if I don't reference jQuery Mobile. Thanks! 回答1: You are referecing it wrong. #loc refers to an ID of an element use this instead. <label class="test"

How do I do a manual line break in an jQuery Mobile button?

99封情书 提交于 2019-12-13 03:03:17
问题 I want to have a button with multiple lines. I could add white-space:normal but that does not allow manual line breaks. I have tried with <br> and but they don't work as a jQM button is text only. Note that I do not want automatic line-breaks, but I want to decide myself where to put them. Nor do I want to change the height of the button. No, I want to add extra linebreaks. i.e. I want to be able to have a button with Text like this instead of Text like this Is there a way around this

change height of buttons in jquery mobile 1.4, best practices

房东的猫 提交于 2019-12-13 02:56:47
问题 With JQM 1.3 the best practice to change a button's height was : #containerdivID .ui-btn { height:20px; line-height:20px; } is it still right for JQM 1.4...I mean the buttons are weird, there is a kind a inner margin around them : Here's my html : <div id="expShortButtonsStart"> <button id="ExpShortGotoapp" class="ui-btn-b ui-icon-logo ui-btn-icon-right">Start</button> </div> 回答1: In case the button is into a div container, you need to remove the top and bottom padding: #expShortButtonsStart

jQuery Mobile thumbnail image alignment

元气小坏坏 提交于 2019-12-13 02:52:26
问题 I already read the other questions about that topic, but they've never really been solved. I need to set the thumbnail of a listview centred. Those Thumbnails have a maximal heigt, but some of my Icons are smaller than the maximal height. Setting a fixed padding to the thumbnail doesn't work for different thumbnail sizes. Small Icon: Larger Icon: My list-items: <% boxFolder.each(function(box){ name = box.get("name"); fullPath = box.get("fullPath"); type = box.get("type"); %> <li data-theme="c