I have purchased this plugin and LOVE it so much! I also have a purchased timeline on my website which allows multiple ways of sorting times and dates.
When I initially go to the timeline the lightbox works perfectly! However, once I use the sort function (which I believe uses ajax) the lightbox no longer functions.
In speaking to the author of the timeline plugin they advised the following:
I've checked the lightbox plugin. You need to call it's function in our plugin's load-more.js file after line no. 109 ( re_enable_pp(timeline_wrp); )
A selection of code that he referenced:
Code: |
loading = true;
var data = {
action: 'ct_ajax_load_more',
page: page,
last_year:last_year,
alternate:alternate,
attribute: ct_load_more.attribute
};
$.post(ct_load_more.url, data, function(res) {
if( res.success) {
if(type=="compact"){
var $grid= timeline_wrp.find('.clt-compact-cont').append( res.data );
ctl_compact_settings($grid);
}else{
timeline_wrp.find('.cooltimeline_cont').append( res.data );
}
enable_navi(timeline_wrp);
Line 109:
re_enable_pp(timeline_wrp);
*code for lightbox goes here*
page = page + 1;
loading = false;
button.html(org_label);
timeline_wrp.find("a[class^='ctl_prettyPhoto']").prettyPhoto({
social_tools: false
});
timeline_wrp.find("a[rel^='ctl_prettyPhoto']").prettyPhoto({
social_tools: false
});
if(page>=max_page_num){
button.hide();
}
} else {
// console.log(res);
}
}).fail(function(xhr, textStatus, e) {
console.log(xhr.responseText);
});
|
Would you be able to help me with what code to insert there?
Thank you kindly!