confirmModalFun=function(element)
{
    clearAll();
    if(element.className.includes('logout'))
    {
        $('.headerTxt').text('Confirm Logout');
        document.getElementById("bodyTxt").innerHTML='Are you sure you want to logout now?'
    }
    else if(element.className.includes('cancelStep'))
    {
        $('.headerTxt').text('Cancel This Step');
        document.getElementById("bodyTxt").innerHTML='Are you sure you want to skip this step?'
    }
    else if(element.className.includes('deleteIcon'))
    {
        $('.headerTxt').text('Confirm Deletion');
        document.getElementById("bodyTxt").innerHTML='Are you sure you want to delete &nbsp'+'<b>'+ $(element).parent().parent().children()[1].textContent+'</b>'+'&nbsp story?'
    }
       
}
$(document).on('show.bs.modal', '#confirmModal', function (e) {
    var $trigger = $(e.relatedTarget);
    console.log($($trigger)[0].className)
});
function clearAll()
{
    document.getElementById('playSound').pause();
    var id = window.setTimeout(function() {}, 0);
    while (id--) {
        window.clearTimeout(id); // will do nothing if no timeout with id is present
    }
}