Wiipass: jQuery and more Tiziano Treccani's useful plugin for jQuery and other stuff

16mag/0910

jQuery Hintbox 1.2 released

News

- Match hint option added. This option allows to filter resulting list showing only entries matching with input text. Default value is -> matchHint : false
- Disabled automatic browser autocomplete function. Thanks Eric ;-)
- Fix css bug when resulting list was empty

DOWNLOAD HERE : jquery hintbox 1.2
Working demo: HERE

suggestions and comments are welcome


Commenti (10) Trackback (2)
  1. Hi there, i have big troubles prosition the hintbox itself, your demo does work with a no padding and no layout, but if you have a layout in columns and padding and all, the top and left of the hintbox doesnt connect to the input type itself.

  2. Hi there… really good code. Congrats and thank you for sharing it.
    I have a question, I downloaded the code and changed the value of the cities.txt file. Some new cities I added are long and they wrap around the search results area. Is there a way to expand the size of the results area so the name of the city doesn’t wrap around?
    Thanks in advance

  3. Hi everyone…. I think I got the answer to my own question. First I needed to increase the size of the input field on the css file. Second, I added the autoDimentions arg set to true on the jQuery code.

    jQuery(document).ready(function(){
    jQuery(‘#input_1′).hintbox({
    url: ‘cities.txt’,
    matchHint: true,
    autoDimentions: true
    });

  4. Thanks Tulio.
    You found the right way to customize my plugin width. In effect, you can customize every style property through the css file ;-)
    I’m sorry for my pour documentation, but I don’t have enough time to write a better one.
    Just an info (if you don’t know it yet): everything you write into the hintbox is passed as param to the calling URL. For example, if you search for “Rome” and you are calling an URL like http://www.example.com, the resulting GET call is: http://www.example.com?q=Rome.
    This is useful for server-side elaborations whitch sould be, for example, a dynamic search into a database.
    Regards,

    Tiziano

  5. Great. Thanks Tiziano. Awesome code.

  6. Any plans on expanding the code to allow for JSON to be returned rather than just plain text with newlines? This would help greatly without complicating this nice implementation too much.

    Thanks!

  7. I have problems with the sort-parameter. It does not seem to work

    I use

    jQuery(\’#venuestrasse\’).hintbox({
    url: ‘abcd,txt’,
    useCache: false,
    sort:true,
    matchHint: true,
    });

    but as you can see at http://www.jazzbuero-hamburg.de/versionneu/konzerte/ein-testformular-mit-veranstalter-auswahl.html when entering a B, all entries with “B” will be shown, let them be the first letter or inside the word

    what is wrong? This is not very helpful for the users…

  8. @Paul,

    I had the same problem and I found a solution which is not really useful but which works:

    in the uncompressed file jquery.hintbox-1.2.js I uncommented line 376 to 380 because there the position is (mis-)calculated and I use that file instead of the compressed one.

    That is a fast fix, but not a solution unfortunately

    container.css({
    // ‘top’: offset.top + input.outerHeight() – parseInt(input.css(‘border-bottom-width’)),
    // ‘left’: offset.left – parseInt(unsortedList.css(‘border-left-width’)),
    // ‘position’: ‘absolute’
    });

  9. Hi all,
    thanks for your feedbacks. I suppose I’ll have to release a new version in order to fix these bugs. I think I’m going to implement also the JSON support. Have you got other request / ideas / bugs to point out?

  10. Hintbox 1.3 has just been released. Have fun! :-)


Lascia un commento