This is because those elements aren’t present when the page is finished loading, they’re inserted later on using javascript.
Try hooking into #media-items and running your code when new elements are inserted rather than when the root element is ready.
Related Posts:
- Set Featured Image programmatically (in admin) with JavaScript?
- How can I include JavaScript that use jQuery on admin side
- Use latest jQuery in WordPress (admin interface)
- Get current logged in user under 3.1, re: remove “Howdy”
- Plugin admin panel JavaScript Broken
- Custom Jquery in admin breaks media-upload script
- Default scripts added to each admin page
- Weird jquery problem when upgrade to WordPress 3.1
- Add custom column to Users admin panel
- wp_verify_nonce vs check_admin_referer
- Modal window from within WordPress admin
- How do I remove dashboard access from specific user roles?
- Search posts by ID in admin
- Sort pages in loop by admin’s page attributes order field?
- Edit “thank you for creating with WordPress” in version 3.3.1
- How to save dismissable notice state in WP 4.2?
- Notification that the admin is online
- Plugin to remove Admin menu items based on user role?
- How to obtain the user ID of the current profile being edited in WP-Admin?
- Are there any action like ‘init_frontend’
- Get current active wp color scheme
- Cannot login to WordPress Admin with SSL terminated load balancer
- use add_settings_field properly?
- How to fix admin stylesheet muck-up? [closed]
- Turn off admin emails for new user registrations
- Remove admin AND editor from the “change role to” menu in user listing
- Modify CSS via Theme Control Panel
- Adding custom Javascript to the head tag in Admin
- Is there a way to prevent author change when editor/administrator edits a post?
- Better search for WordPress admin backend [closed]
- Making Media Library “Alternative Text” Field Required
- Add extra field when admin create user
- Replacing the List table of a Post Type
- changing body background color for custom post type in admin backend
- Adding scripts to admin page in my theme
- How to Remove the “Restore” Link in Quick Edit?
- How can I place the “Add New Post” contents on a custom page?
- Getting Rid of the WordPress.com Toolbar on Other Sites?
- Any way to inherit methods from both my plugin class and WP_List_Class?
- How to notify the admin about something that happened during a cron job
- Restrict dashboard access for specific user roles to specific actions
- wp_dropdown_pages() in theme admin page
- How to enable enqueue_script to work with a logged in user?
- I’m receiving requests to change the admin email. How can this be happening?
- How can I load an inline script after the enqueued scripts in admin?
- Set admin body to ltr on a rtl installation
- Restore original WP admin bar after BuddyPress install [closed]
- front end editing using iFrames, best approach?
- Are there any filters to add additional columns to the list table on edit-comments.php?
- Can I mass change all admin emails for a multisite instance?
- WordPress Frontend Check If Current User Is Administrator
- Instructions for a custom post type
- WordPress admin area used to administer other site
- How to display a WordPress notice on create_term action
- Problems with WP_List_Table and hooks
- Add ‘Last Modified’ and Attachments (Yes/No) to WordPress Users Column
- WordPress administrator area access disabled temporarily due to widespread brute force attacks
- Modifying the built-in behavior of ajax tag type-ahead functionality of WordPress
- Why am I timing out when using the Menu Editor?
- How can I merge two authors?
- Why can’t a custom postype be registered with “admin_init” hook?
- Accessing variable from admin panel?
- How to pass multiple parameter in add_action()
- Add term of current custom post type to admin body class using admin_body_class
- Changing admin user id for database
- Limiting Admin Backend Search to Title
- Order All Pages table in administration
- Does deleting the table users prevent all logins?
- Include script files for admin submenu page
- Is there a filter to remove or replace the post title’s link in the admin post table view (edit.php)?
- Restrict access to admin
- Wp ajax not working from “current_screen” admin hook
- solution to prevent specific admins from altering site contents
- Shows site under construction but comes up after I login to admin
- WordPress Admin very slow
- Prevent users in the backend from seeing WP/Plugin notifications and update annoucements?
- Want to know who is login Admin/User
- Change field layout when adding a page
- Show all admin menus in a table
- Where is the User’s Admin Bar Preference stored? I want it to default to off for new users
- Trying to hide a submenu link which is created by Co-authors Plus plugin
- When admin approves a registered user, I don’t want to send a notification email to users
- add instructions to upload pages and / or forms
- Populate Dropdwon with DIR files, save value and keep it “selected”
- Add a jQuery snippet for sepcific user role
- Signed-in as admin on just part of the site
- How to update my website with WordPress?
- WordPress login process is hanging
- Blank page beyond dashboard
- Cannot save Post
- Shortcut to widget/sidebar editing on the admin menu?
- Disable wp-admin log on lightbox overlay
- Clear custom field when new tag is added
- Add a link to the Admin menu
- Exclude admin from the top commenters list [duplicate]
- Troubleshooting white screen when editing specific posts
- Buddypress send admin notification email when new subscriber registers
- Background image in login showing in admin area
- What Role to assign remote site developer?
- AJAX call not initializing for non-admins in WordPress