May 17, 2015

jQuery contains vs. JavaScript indexOf to filter results

jQuery contains vs. JavaScript indexOf to filter results $(‘#sess_input’).on(‘keyup’, function(){ var filter = $(this).val(); $(“#sess_table .sess_rows”).each(function() { var found = $(this).text().toLowerCase().indexOf(filter); if(found

May 14, 2015

is_woocommerce function to cover all important woocommerce pages

is_woocommerce function to cover all important woocommerce pages function is_wc(){ return ( is_woocommerce() || is_shop() || is_product() || is_cart() || is_checkout() || is_account_page() ); }

May 13, 2015

php function to get first letter of each word and make a unique key

A PHP helper function to arrange and rearrange randomly generate php array elements.