start with Massive Builder
Create a new page
'),
btn = $('Loading...
');
$.ajax({
type: 'post',
url: mBuilderValues.ajax_url,
data: {
action: 'pixflow_loadFontStyles',
nonce: mBuilderValues.ajax_nonce,
fontKey: $this.find(".selected-option").attr('data-font-id'),
value: '',
mbuilder_editor: true
},
success: function (response) {
$('.google-fonts-styles[data-input="' + $this.attr("data-input") + '"] .dropdown-options').html(response);
generateInputVal($this.attr('data-input'));
}
});
});
$('body').on('change', 'input[name = "google-fonts-styles"]', function (event) {
generateInputVal($(this).parent().attr('data-input'));
});
};
/**
* @summary call user functions that sets to call after each shortcode build or rebuild
*
* @param {string} type - shortcode type
* @param {object} obj - jQuery object of shortcode
* @since 1.0.0
*/
mBuilder.prototype.specialShortcodes = function (type, id) {
var that = this;
var obj = $( '[data-mbuilder-id='+ id +']' );
var obj_child = obj.find('[data-mbuilder-id]');
if ( obj_child.length ){
obj_child.each(function(){
that.specialShortcodes( $(this).attr('data-mbuilder-el') , $(this).attr('data-mbuilder-id') );
});
}
if (typeof this[type + "Shortcode"] == 'function') {
this[type + "Shortcode"](obj);
}
obj.parents('.mBuilder-element[data-mbuilder-el="md_accordion_tab"]').find('h3.ui-state-active').siblings('.wpb_accordion_content').css('height', '');
obj.parents('.mBuilder-element[data-mbuilder-el="md_toggle_tab"]').find('h3.ui-state-active').siblings('.wpb_toggle_content').css('height', '');
obj.parents('.mBuilder-element[data-mbuilder-el="md_toggle_tab2"]').find('h3.ui-state-active').siblings('.wpb_toggle_content').css('height', '');
};
mBuilder.prototype.vc_empty_spaceShortcode = function (obj) {
var that = this;
var id = $(obj).attr('data-mbuilder-id');
$(obj).find( '.vc_empty_space' ).resizable({
maxWidth : 500,
minWidth : 0,
handles : 's',
create: function (event,ui) {
if( !that.getModelattr(id,'height') ){
that.setModelattr(id,'height',$(obj).height());
}
if( ! $(obj).find( '.space-resize-val').length ) {
$(this).append('