mirror of
https://github.com/jimeh/fancy_input.git
synced 2026-02-19 11:36:41 +00:00
Renamed project to Fancy Input.
* Major restructuring of the plugin objects for easier extending. * Bumped version to v0.2.0.
This commit is contained in:
86
demo/fancy_suggest.html
Normal file
86
demo/fancy_suggest.html
Normal file
@@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
|
||||
<title>Fancy Suggest Demo</title>
|
||||
<link rel="stylesheet" href="demo.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script src="../javascripts/jquery.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="../fancy_input/jquery.fancy_input.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../fancy_input/jquery.fancy_suggest.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../fancy_input/jquery.fancy_suggest.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
|
||||
<script src="demo.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function(){
|
||||
|
||||
$("#example1").fancy_suggest({
|
||||
data: exampleData
|
||||
});
|
||||
|
||||
$("#example2").fancy_suggest({
|
||||
url: "server-side.php",
|
||||
});
|
||||
|
||||
$("#example3").fancy_suggest({
|
||||
url: "server-side.php",
|
||||
name: "example3",
|
||||
no_results: false,
|
||||
limit: 4,
|
||||
tpl_result_body: '<span class="title">{{title}}</span><span class="info">{{ info }}</span>'
|
||||
});
|
||||
|
||||
$("#example4").fancy_suggest({
|
||||
data: exampleData,
|
||||
pos_top: 0,
|
||||
pos_left: 20,
|
||||
width: 168
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
|
||||
/* Example 3 */
|
||||
#fancy_suggest li span.info {
|
||||
color: #888;
|
||||
}
|
||||
#fancy_suggest.example3 li {
|
||||
border-bottom-style: dashed;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
<p></p>
|
||||
<h1>Fancy Suggest Demo</h1>
|
||||
<p>
|
||||
<strong>Results from local array:</strong><br />
|
||||
<input type="text" name="example1" value="" id="example1" />
|
||||
</p>
|
||||
<p>
|
||||
<strong>Results from ajax call:</strong><br />
|
||||
<input type="text" name="example2" value="" id="example2" />
|
||||
</p>
|
||||
<p>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user