Highlight list items starting with 'A'

<< Click to Display Table of Contents >>

Navigation:  Using script in HTML document > Usage examples >

Highlight list items starting with 'A'

 

procedure TestA(E: TElement);
begin
  if AnsiStartsWith(E.Attr['name'], 'A') then 
    E.css('font-weight: bold;');
end;
 
procedure Highlight();
begin
  $('#ul li').Each(TestA);
end;