Both SetCookie() and GetCookie() works good.
Problem:
In bellow code how could i make condition IF cookie value NULL then BOX show otherwise HIde.
I have run but condition not going true.
$(document).ready(function(){
var first_name = getCookie("chat_name");
var user_id = getCookie("chat_id");
var img_src = getCookie("chat_img");
if(first_name !=="" && user_id !=="" && img_src !=="")
// if(document.cookie.length > 0)
{
$("#chat_output").show();
$("#hidebox").show();
$("#chat_store").show();
$("#chat_box").show();
}
});
For Delete Cookie i used bellow code.its works good
document.cookie ="chat_id=''";
document.cookie ="chat_name=''";
document.cookie ="chat_img=''";
Can you suggest me how i can solved this issue.
Thank You