JSFiddle - React, Tailwind, and code Playground
by Philipp1918
HTML
<!--Activation button-->
<button class="btn__active-modal" data-href="test.html">
View document
</button>
<!--content block-->
<div class="content__wrap_ajax"></div>
<script>
$(window).ready(function () {
$('.btn__active-modal').fit_modal({
on_ajax_mod : true,
modal_content_block : 'content__wrap_ajax',
modal_title : 'View document',
window_animation_type : 'fade_in_top'
});
});
</script>
JavaScript
//The ajax mod has its own settings
$('element').fit_modal({
on_ajax_mod : true,
ajax_mod : { //ajax options
href : null, //url
post_type : 'GET', //action type
data : null, //data type
error_message : "Server error or page not found.", //error message
success_custom_func : null, //user function
error_custom_func : null //user function
},
});