Ok so after working a bit I came up with this:
- <ul id="searchBox" data-role="listview" class="listResults searchSide" data-filter="true" data-filter-reveal="true" data-filter-placeholder="Search">
- <some li's>
- </ul>
- <script type="text/javascript">
- //the function is called somewhere else ... below is the function
- function changePlaceholderText(passedID) {
- var theID = passedID;
-
- var newPlaceholder = null;
- if (theID == "navTabsBldgContactInfo") { newPlaceholder = "Building Contact Search"; }
- else if (theID == "navTabsPeople") { newPlaceholder = "People Search"; }
- else { newPlaceholder = ""; }
- $("#searchBox").listview("option", "placeholder", newPlaceholder);
- }
- </script>
Based on alert() placement, I've determined that:
1. var theID is passing correctly
2. var newPlaceholder is being set correctly
3, running an alert at the end like (below) shows that everything is set correctly. However, the HTML on the screen still reflects the old data-filter-placeholder text .
- var filterPlaceholder = $("#searchBox").listview("option", "filterPlaceholder");
- alert(filterPlaceholder);
Any help you have would be appreciated. I'm afraid I'm stuck.