I tried to set the popup when you click text button in revolution slider, but it won’t open just keep loading. The code that I set as below.
/* change revapi1 to whatever api number is being used for your slider */
var api = revapi28;
/* load a specific div from the page via Ajax */
var ajaxContentContainer = ‘.terms_cond’;
/* no need to edit below unless you want to change the default FancyBox settings */
api.on(‘revolution.slide.onloaded’, function() {
jQuery(this).find(‘.fancybox’).each(function() {
var $this = jQuery(this);
if(!$this.is(‘a’)) $this = $this.removeClass(‘fancybox’).find(‘a’);
$this.addClass(‘fancybox fancybox.ajax’).attr(‘rel’, ‘gallery’).fancybox({
/* begin FancyBox options */
width: ‘auto’,
height: ‘auto’,
autoSize: true,
aspectRatio: true,
fitToView: true,
autoCenter: true,
scrolling: ‘auto’,
onClosed: function() {api.revresume()},
ajax: {
dataFilter: function(data) {
return jQuery(data).find(ajaxContentContainer)[0];
}
}
}).on(‘click’, function() {api.revpause()});
});
});
the page is :http://wp2.upauto.com/order32truck/