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)
- My javascript is returning this error: $.ajax is not a function
- ajax jquery simple get request
- jQuery AJAX cross domain
- Set timeout for ajax (jQuery)
- jQuery AJAX submit form
- How can I upload files asynchronously with jQuery?
- Download a file by jQuery.Ajax
- Turn a URL into an Attachment / Post ID
- Keyboard shortcut for updating a page or post?
- How to load paginated post pages via ajax
- Get the current post ID as a variable in Javascript
- Getting the post_id in wp_ajax function
- Load posts dynamically
- Drag and drop multiple file upload using Ajax WordPress
- Turn jQuery.ajax() request into XMLHttpRequest (vanilla JavaScript)
- Working Bootstrap Carousel Conversion to WP – Technical Questions
- WordPress theme ajax have_posts()
- Create a separate JS application for an individual post?
- Display notification only once
- Access/update database with jQuery
- Add scripts on custom post add/edit pages Not Working
- Colorbox ajax loading of outside HTML content works perfect on localhost but not on server
- Disable Jquery UI post tabs
- class click counter save number
- WooCommerce Ajax Cart Update Stopped Working
- Integrate OpenStreetMap on WordPress
- AJAX not Working with php as supposed
- Post repeating with infinite scroll
- Load Next Posts With AJAX not working with custom post type
- 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
- Use Click Image to Play Youtube Video in a WordPress Loop
- Ajax Validation for reCaptcha
- wp_query with ajax
- After ajax image is outside the “ tag
- Retrieve post in AJAX Callback
- AJAX Success Function using JS substr() fails in WP 4.1 vs 4.0
- Adding JS functionality to the Publish button in wp-admin/post.php
- Using jQuery .after inside loop
- Ajax page load in wordpress the right way?
- Uncaught TypeError: Cannot read properties of undefined (reading ‘message’) [closed]
- Jquery POST Ajax Return null data in wordpress
- duplicate posts with ajax load more wordpress
- Using AJAX to filter posts without refreshing page
- Running JavaScript after using WooCommerce Filter Plugin
- Ajax Call not Working in Plugin
- WordPress live search and filter
- Update $wpdb query with AJAX
- Unable to delete attached file from folder programmatically
- AJAX to add to cart multiple products woocommerce
- Ajax: load content from post I clicked
- Download doccument on server rather than clients browser
- Cannot successfully execute AJAX script to call function.php specific function. Using XAMPP localhost to test
- How can i get the same ajax result using WP REST API instead of admin-ajax?
- Orderby post__in Not Working Correctly?
- Filterable posts using categories
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Ajaxify Post Sort
- WP_Query extended with AJAX
- problem with creating a wordpress post slider
- 500 (Internal Server Error) of external php file
- Displaying contents of a tab
- How to get posts from network blog
- How to use extract shortcode in loop?
- Ajax, jQuery and WordPress
- WP Gallery Image Page Issue When 2 galleries share one image
- Adding a time stamp on post view
- Load css classes after using ajax calls
- Pass a PHP variable (loop-audio.php) to jQuery function (js/script.js)
- WordPress Ajax send response on every iteration of a loop
- WordPress Ajax load doesn’t work
- AJAX call not initializing for non-admins in WordPress