Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Load súboru admin-scripts.php vo WP admine (len pri post.php, nikde inde)
- function admin_scripts($hook) {
- if ('post.php' !== $hook) {
- return;
- }
- wp_enqueue_script('my_custom_script', '/wp-content/themes/mytheme/js/admin-scripts.js');
- }
- add_action('admin_enqueue_scripts', 'admin_scripts');
- // Obsah súboru admin-scripts.js
- jQuery(document).ready(function(){
- var val;
- jQuery('.quantity .view').each(function(){
- val = jQuery(this).text().replace(/[^0-9]/g, '');
- if(val != '1') {
- jQuery(this).parent().parent().css('background-color', '#d5f8fb');
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement