{"action":"created","issue":{"url":"https://api.github.com/repos/vdw/HideSeek/issues/22","labels_url":"https://api.github.com/repos/vdw/HideSeek/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/vdw/HideSeek/issues/22/comments","events_url":"https://api.github.com/repos/vdw/HideSeek/issues/22/events","html_url":"https://github.com/vdw/HideSeek/issues/22","id":128230745,"number":22,"title":"Select elements to be ignored when searching","user":{"login":"mjvezzani","id":3307434,"avatar_url":"https://avatars.githubusercontent.com/u/3307434?v=3","gravatar_id":"","url":"https://api.github.com/users/mjvezzani","html_url":"https://github.com/mjvezzani","followers_url":"https://api.github.com/users/mjvezzani/followers","following_url":"https://api.github.com/users/mjvezzani/following{/other_user}","gists_url":"https://api.github.com/users/mjvezzani/gists{/gist_id}","starred_url":"https://api.github.com/users/mjvezzani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjvezzani/subscriptions","organizations_url":"https://api.github.com/users/mjvezzani/orgs","repos_url":"https://api.github.com/users/mjvezzani/repos","events_url":"https://api.github.com/users/mjvezzani/events{/privacy}","received_events_url":"https://api.github.com/users/mjvezzani/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/vdw/HideSeek/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-22T19:51:03Z","updated_at":"2016-01-25T10:19:35Z","closed_at":null,"body":"Hi,\r\n\r\nI've been playing with HideSeek and I quite like it. However, I was wondering if it is possible to tag child elements to not be part of the search. For instance:\r\n\r\n```\r\n<input id=\"search\" name=\"search\" placeholder=\"Search for something\" type=\"text\" data-toggle=\"hideseek\" data-list=\".list\" />\r\n<div id=\"myId\" class=\"list\">\r\n    <p>Text I want to search</p>\r\n    <span>Text to not be included in search</span>\r\n</div>\r\n```\r\n\r\nI tried adding `<span class='ignore'>`, but it continued to be included in my search. Is it possible to exclude content in the html document from the search? Thanks!"},"comment":{"url":"https://api.github.com/repos/vdw/HideSeek/issues/comments/174461374","html_url":"https://github.com/vdw/HideSeek/issues/22#issuecomment-174461374","issue_url":"https://api.github.com/repos/vdw/HideSeek/issues/22","id":174461374,"user":{"login":"vdw","id":1730123,"avatar_url":"https://avatars.githubusercontent.com/u/1730123?v=3","gravatar_id":"","url":"https://api.github.com/users/vdw","html_url":"https://github.com/vdw","followers_url":"https://api.github.com/users/vdw/followers","following_url":"https://api.github.com/users/vdw/following{/other_user}","gists_url":"https://api.github.com/users/vdw/gists{/gist_id}","starred_url":"https://api.github.com/users/vdw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vdw/subscriptions","organizations_url":"https://api.github.com/users/vdw/orgs","repos_url":"https://api.github.com/users/vdw/repos","events_url":"https://api.github.com/users/vdw/events{/privacy}","received_events_url":"https://api.github.com/users/vdw/received_events","type":"User","site_admin":false},"created_at":"2016-01-25T10:19:35Z","updated_at":"2016-01-25T10:19:35Z","body":"Hi, in order to ignore an element from the list, you have to add this ``` data-ignore=\".ignore\" ``` to your code:\r\n\r\n```html\r\n<input id=\"search\" name=\"search\" placeholder=\"Search for something\" type=\"text\" data-toggle=\"hideseek\" data-list=\".list\" data-ignore=\".ignore\" autocomplete=\"off\" />\r\n<div id=\"myId\" class=\"list\">\r\n    <p>Text I want to search</p>\r\n    <p class=\"ignore\">Text to not be included in search</p>\r\n</div>\r\n```\r\n\r\nor this ``` ignore: '.ignore' ``` if you are using javascript to initiate the plugin:\r\n\r\n```javascript\r\n$('#search').hideseek({\r\n    highlight: true,\r\n    ignore: '.ignore'\r\n});\r\n```\r\n\r\nHere is a working example: https://jsfiddle.net/dkrestos/m06r3go7/\r\n\r\nNote: Use only one way to initiate the plugin, either javascript or data attributes. "}}