Jquery Plugin: similar to Google Smart Search tips

Source: Internet
Author: User
Imitating a plug-in made by Baidu and Google, if you have used it, Please give more comments. Smart Search prompts "alt =" jquery plug-in: similar to Google Smart Search Prompt "src =" http://simg.sinajs.cn/blog/images/face/001.gif ">

************ ************
// Author: iddqd)
// Email: iddqd5376@163.com
// Http://blog.sina.com.cn/iddqd
// Version 1.1

// Note: Smart Search Prompt
// The plug-in must be bound to the input box control.
// The Ajax return value should be:
// <Li> <p> here is the search result </P> <span> Number of Results </span> </LI>
// Added the upper/lower keys and carriage return function.

// Parameter settings:
// Offset_top                   Top offset relative to the bound control
// Offset_left                  Left offset relative to the bound control
// Panel_width                  Width of the displayed search result list
// Posturl                      Ajax path
// Watermark                    Default Value in the input box
// Watermark_color              Default color of the input box
// Watermark_change_color       The color after the input box is changed
// Choose_color                 Move the cursor over the result list to change the color
// Callback                     The name of the selected function. Only one parameter of the function is the value of the input box.
************ *************
(Function ($ ){
   Jquery. FN. Extend ({
       Searchhelp: function (OPTs ){
           Opts = jquery. Extend ({
               Offset_top: 0,
               Offset_left: 0,
               Panel_width: $ (this). Width (),
               Posturl :"",
   

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.