javascript - Show popups only once when user logged in -


i working mvc4. in layout page , have popup shows when user logged in.

  @if (user.identity.isauthenticated)     {        <div class="pop-suggest popup_window">                      <div class="invite-add">                <a id="popupboxclosead" class="close-popup">x</a>                    <h4 class="invite-tit">"earn more points, more products!!!"</h4>            <div> invite friends</div>         </div>                 </div>     } 

for close popup use following jquery,

 $('.close-popup').click(function () {     close_popup();  });  function close_popup() {           $('.popup_window').fadeout(500);          } 

my problem that, after login, popup arrive in every page refresh. how can change code popup div shows when user login , after close not come.

in opionion can create cookie when user log in kind of flag , destroy cookie on log out. doing similar in apps , works great.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

qt - How to embed QML toolbar and menubar into QMainWindow -