Skip to content

Commit

Permalink
- update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
itb2k13 committed May 3, 2018
1 parent 2e94f22 commit c2b68a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ apply the class 'pughound' to a target input text element
showcounts : true,
countformat : '({0})',
ignorekeycodes : [27, 39, 40, 32, 37, 38, 9, 17, 18, 13],
mapping : function(n,i){return {count : n.Count, text : n.Text, url : n.Url}; },
urlformatting : function(url){return url;} //window.location.href.split('?')[0] + '?' + item.url;
mapping : function(n,i){return {count : n.Count, text : n.Text, url : n.Url, id : n.Id }; },
urlformatting : function(url){return url;},
onanchorclick: function (data) { $('#MyFieldId').val(data.Id); }
};

$('.pughound').pughound(options);
Expand All @@ -89,6 +90,9 @@ allows a custom JS function to be defined so that remote data sources can be map
### urlformatting
allows customization of the result-set hrefs (see section 'Remote Sources' further down)

### onanchorclick
allows specification of a custom function which will execute on the anchor click and has access to the items data element

## least important

### customclass
Expand Down
3 changes: 2 additions & 1 deletion jquery-pughound.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
A simplistic plugin for rendering suggestive search results from a remote data source
version 1.0, June 15 2017
version 1.0.3 July 03 2017
version 1.0.4 July 20 2017
version 1.0.4 July 20 2017
version 1.0.5 May 03 2018
by Steph Smith
The MIT License (MIT)
Expand Down

0 comments on commit c2b68a7

Please sign in to comment.