Changeset 648

Show
Ignore:
Timestamp:
2008-06-27 22:50:59 (2 months ago)
Author:
arthus
Message:

Made suggestr plugin intelligently find out which tags have been clicked

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/suggestr/trunk/suggestr.js

    r634 r648  
    5858    }, 
    5959    clickable: function() { 
     60        $('#tagsuggestions li').each(function() { 
     61            var searchstr = '\\s*"?' + $( this ).text() + '"?\\s*'; 
     62             
     63            if($('#tags').val().search(searchstr) != -1) { 
     64                $(this).addClass('clicked'); 
     65            } 
     66        }); 
    6067        $('#tagsuggestions li').click(function() { 
    6168            // here we set the current text of #tags to current for later examination