SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jquery autocomplete...

    So i got the jquery autocomplete working on my website, but im unable to make the returned values links... they have the a tag but nothin happens when you click them... an example is here...

    http://www.ratemycommunity.com/rate-...sas%20City

    just enter a zip code at the top right search

  2. #2
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,068
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    I think the problem is in js/autocomplete.js on lines 582-588

    Code:
    ...
    }).click(function(event) {
      $(target(event)).addClass(CLASSES.ACTIVE);
      select();
      // TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus
      input.focus();
      return false;
    })
    ...
    More specifically the problem is the "return false" statement. If you remove that one it should work imho.

    If an element (in this case the ul) has an onclick event that returns false the defeault behavior (in this case following the url that resides somewhere in this ul) is cancelled.

  3. #3
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that worked. thank you so much!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •