DataTables pre-defined search?

DataTables pre-defined search?

Hi,
I am using JQuery Tabs UI and DataTables plugin (http://datatables.net), and want to click and go to tab1, where I have datatables. And there I want to search the word, where was clicked. Example: tab2: searchItem1, searchItem2<--- click there. tab1 opened and "searchItem2" want to show in my sortable :-)

There is code, what I try:


  1. <a style='text-decoration: underline; cursor: pointer;' onclick="$('a[href=#tabs-1]').click(); $('#tabs-1 input[type='text']').text('searchItem2');">searchItem2</a>


Picture example.

¯\_(ツ)_/¯