JSFiddle - React, Tailwind, and code Playground

by beej

HTML

<a href="#" id="click">Click Me</a>
<p id='status'>hey there</p>

JavaScript

$(document).ready(function() {
    
    $('#status').hide();
   
    $('#click').click(function() {
       $.ajax('#');
    });
    
    function tips() {
        var settings = {
            is_tips_call: true
        };
        
        $.ajax('#', settings);
        
        alert("In tips");
    }
   
    $(document).ajaxComplete(function(event, xhr, settings) {
       
        if ('is_tips_call' in settings && settings.is_tips_call == true) {
            // Do nothing
            return;
        }
        
        tips();
       
    }); 
    
   
        
});