I am having trouble to embed an autosuggest script into my existing php file (wordpress). Below is the code and here is the desired result http://www.emposha.com/demo/fcbkcomplete_2/ In addition, the tags system of stackoverflow is great, I am looking something like this one :D
Howvere, instead of the text field I get a select field. It might be something with javascript, I dont know...
The code:
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>FCBKcomplete Demo</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" charset="utf-8" />
<script src="http://code.jquery.com/jquery-1.4.4.min.js" type="text/javascript" charset="utf-8">
</script>
<script s开发者_如何学JAVArc="jquery.fcbkcomplete.js" type="text/javascript" charset="utf-8">
</script>
</head>
<body id="test">
<h1>FCBKcomplete Demo</h1>
<div id="text">
</div>
<form action="submit.php" method="POST" accept-charset="utf-8">
<select id="select3" name="select3">
<option value="test1">sleep</option>
<option value="test3">sport</option>
<option value="test3">freestyle</option>
</select>
<br/>
<br/>
<input type="submit" value="Send">
</form>
<script type="text/javascript">
$(document).ready(function(){
$("#select3").fcbkcomplete({
json_url: "data.txt",
addontab: true,
height: 2
});
});
</script>
<div id="testme"></div>
</body>
Well, that's a select
tag in your HTML there instead of input type="text"
. What did you expect to happen?
精彩评论