Last active
December 12, 2016 10:12
-
-
Save mrtuvn/8caf052977df6912cf949910930a2dd7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
method: "GET", | |
data: {}, | |
dataType: 'json', | |
url: previewUrl, // http://m2.dev/megamenu/menu/view/id/1 | |
cache: false, | |
showLoader: true, | |
context: $('body'), | |
success: function(res) { | |
$("#preview-area").removeClass('loading').addClass('loaded'); | |
if (menuPreview.options.menuType == 'vertical') { //vertical | |
$('.horizontal-area').hide(); | |
$('.vertical-area').show(); | |
$('.vertical-preview').html(res); | |
} else { // horiziontal | |
console.log('test'); | |
$('.horizontal-area').show(); | |
$('.vertical-area').hide(); | |
$('.horizontal-preview').html(res); | |
} | |
//$$("#preview-area").html(res); | |
$("#preview-area").first().trigger('contentUpdated'); | |
$("#preview-area").fadeIn(500); | |
}, | |
error: function(XMLHttpRequest, textStatus, errorThrown){ | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment