- Jan 1, 2019
- 2,018
- 1,109
I have issue with hide and show content in Table because the table show the whole by default.
I want to hide content UNTILE the visitor type the "ZIP-CODE" and press "ENTER KEY" , or the visitor click on the search button.
which means the visitor gonna see only the specific row.
I already try TablePress Plugin and I modified thier php addons file from
PHP:
$( '.dataTables_filter' ).find( 'input' ).on( 'keyup', function() {
$( '.dataTables_wrapper' ).find( '.tablepress' ).toggle( '' != $(this).val() );
} ).keyup();
TO
PHP:
$( '.dataTables_filter' ).find( 'input' ).on( 'keyup', function(e) {
if( 13 == e.keyCode ) {
$( '.dataTables_wrapper' ).find( '.tablepress' ).toggle( '' != $(this).val() );
}
} ).keyup();
unfortunately not working & wpDataTables also didn't find solution, but I found in plugin call GS2WP Table WordPress Plugin, didn't use it because to expensive and don't find it in your shared plugin.
Do you know any plugin can handle it?
Thanks you guys
| Country | City | Hotel | ZIP CODE |
| Argentina | Buenos Aires | Revelation Resort | 1008 |
| Australia | Melbourne | Comfort Hotel & Spa | 3002 |
I want to hide content UNTILE the visitor type the "ZIP-CODE" and press "ENTER KEY" , or the visitor click on the search button.
which means the visitor gonna see only the specific row.
I already try TablePress Plugin and I modified thier php addons file from
PHP:
$( '.dataTables_filter' ).find( 'input' ).on( 'keyup', function() {
$( '.dataTables_wrapper' ).find( '.tablepress' ).toggle( '' != $(this).val() );
} ).keyup();
TO
PHP:
$( '.dataTables_filter' ).find( 'input' ).on( 'keyup', function(e) {
if( 13 == e.keyCode ) {
$( '.dataTables_wrapper' ).find( '.tablepress' ).toggle( '' != $(this).val() );
}
} ).keyup();
unfortunately not working & wpDataTables also didn't find solution, but I found in plugin call GS2WP Table WordPress Plugin, didn't use it because to expensive and don't find it in your shared plugin.
Do you know any plugin can handle it?
Thanks you guys