- Screen name: AnthonyC
AnthonyC's Profile
3 Posts
153 Responses
0
Followers
Show:
- Expanded view
- List view
Private Message
- 01-Jul-2014 11:41 PM
- Forum: jQuery Mobile
So I had a try at updating from 1.4.2 to 1.4.3, and was testing a listview with autodividers set to true and noticed that when using 1.4.3 the elements with data-role="list-divider" are not filtered.
This was not the case with 1.4.2.
Easily replicated by trying 1.4.2 and 1.4.3 in the following code.
- <!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" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script>
</head>
<body>
<div data-role="page">
<div data-role="header" data-position="fixed">
<h1>Filter Test</h1>
</div><!-- /header -->
<div data-role="content">
<ul data-role="listview" data-autodividers="true" data-filter="true" data-theme="a" data-divider-theme="b">
<li><a href="index.html">Adam Kinkaid</a></li>
<li><a href="index.html">Alex Wickerham</a></li>
<li><a href="index.html">Avery Johnson</a></li>
<li><a href="index.html">Bob Cabot</a></li>
<li><a href="index.html">Caleb Booth</a></li>
<li><a href="index.html">Christopher Adams</a></li>
<li><a href="index.html">Culver James</a></li>
</ul>
</div>
</div>
</body>
</html>
Any ideas? Is this a regression or is there some other option to use?
Edit: So the answer is to add the data-hide-dividers="true" option.
http://api.jquerymobile.com/listview/#option-hideDividers
This seems to be a change to default behaviour from the earlier release.
I had noticed that filter performance in 1.4 had seemed sluggish compared to 1.3 and earlier. It appears that a 250ms delay (verified by inspecting the source JS) has been introduced. As described here:
http://api.jquerymobile.com/filterable/
The filterable widget reacts to the
change
signal by reading the value of the input after a short delay and iterating...Can anyone shed any light on why this might be?
It gives the appearance of being far less responsive because of the delay.
- 25-Nov-2012 05:00 AM
- Forum: jQuery Mobile
I am trying to use the changeHash option of not tracking a changePage in history as described in:If you note the code below, basically I want the page with id "testpage" to not appear in history. This appears to be the case, but when I close this page I transition back two pages in history, back to Page 1. I appear to have this wrong or do not understand what the point of this option is. Note that my code below is a multipage document, this is just for simplicity here, but I am using single page templates and the outcome is the same. I want to close Page 3 and go back to Page 2, but I guess as the URL has not changed data-rel="back" takes me back to Page 1. Could be me but this just seems like the wrong action?Can anyone spot the obvious mistake I'm making? Thanks.- <!DOCTYPE html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
<script>
$(document).on('click', '.testbutton', function(event){
$.mobile.changePage("#testpage", {transition: "slideup", reverse: false, changeHash: false});
});
</script>
</head>
<body>
<div data-role="page" id="page1">
<div data-role="content">
<br />Change Page without History Test<br />
This is Page 1
<a href="#page2" data-transiton="fade" data-role="button" data-inline="true">Page 2</a>
</div>
</div> - <div data-role="page" id="page2">
<div data-role="content">
<br />Change Page without History Test<br />
This is Page 2
<a href="#" data-transiton="fade" data-role="button" data-inline="true" class="testbutton">Test</a>
</div>
</div> - <div data-role="page" id="testpage">
<div data-role="header" data-theme="a"><h1>Test Page</h1></div>
<div data-role="content">
<p align="center">Test No History Page<br /></p>
This is Page 3
<a data-role="button" data-inline="true" data-rel="back">Ok</a>
</div>
</div> - </body>
</html>
- «Prev
- Next »
Moderate user : AnthonyC
© 2013 jQuery Foundation
Sponsored by and others.

