Skip to content

Commit cd8daee

Browse files
author
Gabriel Schulhof
committed
Textinput: Document search style usage outside the page
Fixes gh-250
1 parent b61cbdc commit cd8daee

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

entries/textinput.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,19 @@
6262
<p>One major advantage of using these more specific input types if that on mobile devices, specialized keyboards that speed data entry are offered in place of the standard text keyboard. Try the following inputs on a mobile device to see which display custom keyboards on various platforms.
6363
<iframe src="/resources/textinput/example4.html" style="width:100%;height:730px;border:0px"></iframe></p>
6464

65+
<h3 id="search-outside-page">Search input outside the page</h3>
66+
<p>You can use jQuery Mobile-styled <code>textinput</code> widgets with search functionality in the absence of or outside jQuery Mobile pages. To do so, specify their input type as <code>type="text"</code>, add the attribute <code>data-type="search"</code>, and manually call the <code>textinput</code> plugin on the element.</p>
67+
<p>The markup:</p>
68+
<pre><code><![CDATA[
69+
<input id="the-search-input" type="text" data-type="search">
70+
]]></code></pre>
71+
<p>The script:</p>
72+
<pre><code><![CDATA[
73+
$( function() {
74+
$( "#the-search-input" ).textinput();
75+
});
76+
]]></code></pre>
77+
6578
<h2>Textareas</h2>
6679

6780
<p>For multi-line text inputs, use a <code>textarea</code> element. The <code>autogrow</code> extension provides functionality for auto-growing the height of the textarea to avoid the need for an internal scrollbar. </p>

0 commit comments

Comments
 (0)