Plugin Author
averta
(@averta)
Hi,
Maybe unhooking and re-hooking main styles and scripts be easy, but each slider has unique scripts that needed to initiate the slider.
Also you maybe need to update assets after each plugin update.
If you want to fix the conflict with ajax page loading and Master Slider, there is some easier ways to fix that.
Let us know if you have any further questions.
Regards
Averta
What are the easier ways to fix it?
I’ve turned off pjax for now.
Plugin Author
averta
(@averta)
Hi,
Sorry about the delay in responding.
Master Slide set size for images and elements in slider while initiating slider. When the parent element of slider or slider wrapper isn’t displaying on the page (like using slider under tabs, loading slider with ajax and etc. ) the slider can’t size images and elements correctly. So you need to force to update slider after ajax loading finished or tab clicked.
Currently, Slider will update itself while browser resizing. So even slider loaded with ajax, it will show correctly after resizing browser.
There is a sample code that updates slider and thumbnails after click. By making some simple changes, you can use it for updating slider after ajax loading.
jQuery(".custom-selector").bind("click", function(){
setTimeout( function() {
jQuery.each(masterslider_instances, function(i, slider) {
slider.api.update();
slider.api.__resize(true);
jQuery.each(slider.controls, function( index, control ) {
if (control.realignThumbs) control.realignThumbs();
} );
});
},600 );
});
Notes: Set time out is custom and in this case we assumed that there is a fade effect and showing slider takes about 600 ms of times.
Hope to it makes sense.
Regards
Averta
Thank you!
I’ve will give it a test.