popup when click link little like stackoverflow inbox in css
If i understand your post, you can try something like this: $(function(){ var prv=$([]); $(“.top-bar>.m-link”).click(function(){ var dst=$(this).children(); if(dst.html(“<div style=”width: 50px; height: 10px”>Loading…</div>”).toggle().click(function(ev){ev.stopPropagation();}).is(“:visible”)){ dst.load(“https://api.github.com”); } if(prv[0]!=dst[0]) prv.hide(); prv=dst; }); }); body{ position: relative; margin: 0; padding: 0; width: 100%; background-color: #f7f7f7; box-sizing: border-box; } .top-bar{ position: fixed; top:0; width:100%; height: 22px; background-color: #444; box-sizing: border-box; } … Read more