From 1f7899e21e642126a1f7e10c83413da85990e050 Mon Sep 17 00:00:00 2001
From: Jim Myhrberg
Date: Mon, 15 Mar 2010 13:49:00 +0200
Subject: [PATCH] updated demo page
---
demo/demo.js | 2 +-
demo/index.html | 19 +++++++++++++++----
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/demo/demo.js b/demo/demo.js
index eea54df..eb70c54 100644
--- a/demo/demo.js
+++ b/demo/demo.js
@@ -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"},
diff --git a/demo/index.html b/demo/index.html
index 12d7c60..baeaf03 100644
--- a/demo/index.html
+++ b/demo/index.html
@@ -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: '{{title}}{{info}}'
+ tpl_result_body: '{{title}}{{ info }}'
+ });
+
+ $("#example4").suggest_results({
+ data: exampleData,
+ pos_top: 0,
+ pos_left: 20,
+ width: 168
});
});
@@ -68,6 +75,10 @@
Customized results from ajax call:
+
+ Customized position with results from local array:
+
+
GitHub Project Page