The problem is that the gallery doesn’t exist when colorbox binds itself to the gallery links. I was able to fix this problem by using the ajaxComplete() event, like so:
$(document).ajaxComplete(function(){
$('.gallery-icon a').colorbox();
});
Thanks @Milo for pointing me in the right direction.
Related Posts:
- Ajax Load More Posts in Category Page
- Call current post URL in ajax
- Ajax post doesnt call succes after got the response
- Dynamically update post title in admin page
- Can I load posts via Ajax?
- How to load post content on index page using ajax when post title in sidebar is clicked
- POST from jQuery to PHP
- “Uncaught SyntaxError: Unexpected token
- Add confirmation popup on “Move to Trash”
- The correct way to call posts with ajax
- How do I use Ajax to show the new posts realtime, on the frontpage
- How to create a load more post entries like Twitter?
- Ajax load more button in Recent posts widget
- Ajax Dynamic Archives not showing correct results
- WP_Query with ajax handler returns the same posts
- Ajax post filters not working
- Ajaxify This Code
- Genesis + Ajax + Jquery | Failling to call action
- WordPress as CMS: How to manage/handle images assigned to a post as full-sized background images in a slideshow?
- Using the loop to set locations for all posts on a single google map
- Many buttons not functioning in WordPress dashboard (as admin)
- WP Load post with ajax and apply isotope
- Dynamic Gallery
- Get post id on click of thumbnail
- Cross-Origin Read Blocking (CORB)
- jQuery get textarea text
- How to generate a simple popup using jQuery
- AJAX response error: net::ERR_EMPTY_RESPONSE
- Uncaught TypeError: Cannot read property ‘toLowerCase’ of undefined
- ZIP up all images displayed in a [gallery] and offer as download link
- How to make comments work for a post loaded per Ajax?
- Can’t get a JSON object in response to an Ajax request with wp_ajax
- Confirmation box when submitting post for review
- Add existing images from Media Library in to custom gallery
- Infinite scroll / lazy loading with NextGen Gallery [closed]
- How to create WP Editor using javascript
- WordPress Ajax always returns a 404 error
- Getting an alphabetic post list with two letters onclick on letter
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Show Custom Taxonomy Categories, Listing of Posts, and Single Post via AJAX
- How do I change the gallery that is inserted in the post?
- Handling an Ajax form submit
- Using wp_ajax and wp_ajax_nopriv hooks
- Using an Image Slider twice on the same page
- admin-ajax.php HTTP400: BAD REQUEST – The request could not be processed by the server due to invalid syntax
- Click loads template via ajax
- Convert a complex webpage into WP theme
- How to speed up admin-ajax.php in wordpress
- Add container div to gallery using post_gallery
- Sending jsPDF documents to the server
- AJAX filter posts by year
- Should a photo gallery be in a post or on a page?
- Ajax Modal Flickers When Opened Multiple Times
- How to pass Post_ID variable from theme’s Single.php to custom Plugin using AJAX
- AJAX request status 200 but no actual “response”
- Custom post preview without saving
- Correct way to write jQuery functions in WordPress
- splitting the URL using jQuery
- Block Editor: Reset Reusable Blocks to last saved record
- Scripts not appending to element in AJAX call – why?
- Save Search System
- dynamic dependent select dropdown
- Refresh Markercluster after ajax call
- Random ajax load only works with posts_per_page set to -1
- Trouble with WordPress Ajax Login System – 302
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Display wordpress post’s in popup?
- Send post id through ajax and get the post content back
- Fancybox type popup window that’s not an iframe
- videopress videos are not displayed when loading the content with ajax in a lightbox
- posts_per_page option limits the number of Gallery items
- plugin to post from admin to flickr [closed]
- Auto-realod with new posts // Ajax call
- WordPress Ajax Call inserting data but success response false
- Only show a Post once in 10 visits
- How to return multiple arguments from AJAX callback function
- Dynamically switch template on click
- Use Click Image to Play Youtube Video in a WordPress Loop
- wp_query with ajax
- After ajax image is outside the “ tag
- Retrieve post in AJAX Callback
- Adding JS functionality to the Publish button in wp-admin/post.php
- WordPress cascading dropdown selection search based on Parent Page & Child Page
- Uncaught TypeError: Cannot read properties of undefined (reading ‘message’) [closed]
- Running JavaScript after using WooCommerce Filter Plugin
- Unable to delete attached file from folder programmatically
- Javascript – How do I get specific post fields?
- Cannot successfully execute AJAX script to call function.php specific function. Using XAMPP localhost to test
- Orderby post__in Not Working Correctly?
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- WP_Query extended with AJAX
- Ajax – Post Categories and Load More
- Displaying contents of a tab
- Problem with jQuery in post body?
- How to get posts from network blog
- WP Gallery Image Page Issue When 2 galleries share one image
- Load css classes after using ajax calls
- WordPress Ajax send response on every iteration of a loop
- I got this error POST https://localhost/meraboilerwp/[object%20Object] 404 (Not Found)
- Passing total post count to javascript