mirror of
https://github.com/jimeh/fancy_input.git
synced 2026-02-18 19:16:39 +00:00
updated demo page
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
var data = [
|
||||
var exampleData = [
|
||||
{"title": "Ädams, Egbert", "info": "Bedfordshire", "href": "/demo/user/1", "match": "zzzz"},
|
||||
{"title": "Altman, Alisha", "info": "Buckinghamshire", "href": "/demo/user/2", "match": "zzzz"},
|
||||
{"title": "Archibald, Janna", "info": "Cambridgeshire", "href": "/demo/user/3", "match": "zzzz"},
|
||||
|
||||
@@ -19,19 +19,26 @@
|
||||
$(document).ready(function(){
|
||||
|
||||
$("#example1").suggest_results({
|
||||
data: data
|
||||
data: exampleData
|
||||
});
|
||||
|
||||
$("#example2").suggest_results({
|
||||
url: "server-side.php"
|
||||
url: "server-side.php",
|
||||
});
|
||||
|
||||
$("#example3").suggest_results({
|
||||
url: "server-side.php",
|
||||
name: "example3",
|
||||
empty: false,
|
||||
no_results: false,
|
||||
limit: 4,
|
||||
tpl_result_body: '<span class="title">{{title}}</span><span class="info">{{info}}</span>'
|
||||
tpl_result_body: '<span class="title">{{title}}</span><span class="info">{{ info }}</span>'
|
||||
});
|
||||
|
||||
$("#example4").suggest_results({
|
||||
data: exampleData,
|
||||
pos_top: 0,
|
||||
pos_left: 20,
|
||||
width: 168
|
||||
});
|
||||
|
||||
});
|
||||
@@ -68,6 +75,10 @@
|
||||
<strong>Customized results from ajax call:</strong><br />
|
||||
<input type="text" name="example3" value="" id="example3" />
|
||||
</p>
|
||||
<p>
|
||||
<strong>Customized position with results from local array:</strong><br />
|
||||
<input type="text" name="example4" value="" id="example4" />
|
||||
</p>
|
||||
<p>
|
||||
<a href="http://github.com/jimeh/suggest_results">GitHub Project Page</a>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user