rebind onclick
$('button').on('clicl', function (e) { $(this).closest('div').remove(); }); Replace: $('body').on('click', 'button', function (e) { $(this).closest('div').remove(); });
View ArticleUbuntu get size of the folders and files
sudo du -hs /var/www/ekuskov-admin/* | sort -nk1
View ArticlezClip: copy changed value
zClip has the problem, that if you provide a statis value like – $(‘div’).val() – it will create a flash element with the value of the div. If you want always to copy the actual value of the element,...
View ArticlePHP Request: send a HTTP request
/** * Send the request to the API * @param array $postParam all request params * @return mixed $result is the result from API */ private function sendHttpRequest($postParam=array()) { // Set version of...
View ArticlePHP Array: remove empty values
Remove NULL values only $new_array_without_nulls = array_filter($array_with_nulls, 'strlen'); Remove any FALSE values $new_array_without_nulls = array_filter($array_with_nulls);
View Article