jquery移动搜索选项

jquery移动搜索选项,jquery,jquery-mobile,Jquery,Jquery Mobile,当我点击.gene2时,它会提交结果并对其进行过滤,但输入值为空,并且“清除”按钮没有出现。请帮忙 当我从脚本中删除.submit时,值会更改,但不会过滤。 thx要获得帮助首先,不要在jQuery Mobile中使用.ready(),而是使用pagecreate 其次,您需要在包含可过滤数据的div上手动触发可过滤 HTML 录制时 <!DOCTYPE html> <html> <head> <title>colls</title>

当我点击.gene2时,它会提交结果并对其进行过滤,但输入值为空,并且“清除”按钮没有出现。请帮忙

当我从脚本中删除.submit时,值会更改,但不会过滤。
thx要获得帮助

首先,不要在jQuery Mobile中使用
.ready()
,而是使用
pagecreate

其次,您需要在包含可过滤数据的div上手动触发可过滤

HTML

录制时
<!DOCTYPE html>
<html>
<head>
<title>colls</title>
<link rel="stylesheet" href="./jq/jquery.mobile-1.4.0.css" />
<script src="jquery.js"></script>
<script src="./jq/jquery.mobile-1.4.0.js"></script>
<script src="pay.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

</head>
<body>
<header data-role="header"  data-theme="b">

<h1>liste 1</h1>
</header>
<div  data-role="content" data-theme="b">
<form class="ui-filterable">
<input id="filterBasic-input" data-type="search"  placeholder="votre pays" >
</form>
<div  data-filter="true" data-input="#filterBasic-input"data-theme="b"datainset="true">


<div data-role="collapsible">

<h2><span>alsace</span> <a class="gene02 ui-btn-right"data-role="button"
data-inline="true" data-mini="true" data-icon="search">generique</a></h2>
<p>code:3300</p>
<p class="pays">france</p>
$(document).ready(function() {
$(".gene02").click(function() {    
var $hui= $(this).closest('div').find('.pays').html();  
$("#filterBasic-input").val($hui).submit();
});

});
<div id="filter" data-filter="true" data-input="#filterBasic-input" data-theme="b" datainset="true" >
$(document).on("pagecreate", function () {
  $(".gene02").on("click", function () {
    var $hui = $(this).closest('div').find('.pays').html();
    $("#filterBasic-input").val($hui);
    $("#filter").filterable("refresh"); /* this */
  });
});