6

Show custom notification banner like Zendesk's notification (Web portal)

Have you ever seen the yellow Zendesk's notifications banner at the bottom of menu? Like "Service will be unavailable between....".

Do you want to have your own? I'll show how. For example you want to notice your customers about your webinar.

Create Global Javascript widget and place next code:

function HideBanner()

{

    // set cookie  

    $j.cookie('hide_banner', 'yes', { expires: 3 }); 

    $j("div#ubanner").hide();

}

var banner = "<br/><div id='ubanner' style='border: 1px solid orange;padding: 5px; font-size: 10pt; background-color: yellow; color:#333333'>Please join to our awesome webinar. <a href='https://yourdomain.zendesk.com/entries/21786162'; onclick='HideBanner();'>Details</a> about webinar.  <a href='#' onclick='HideBanner();'>(Hide banner)</a></div>";

 

if ($j.cookie('hide_banner')!='yes')

{  

    $j("div#page div#top").append(banner);

}

 

 

In variable "banner" I placed a sample link to forum entry with details. If you do not need inserting such link you can delete it.

<a href='https://yourdomain.zendesk.com/entries/21786162'; onclick='HideBanner();'>Details</a> about webinar.

 

You can set up cookie time to live in next line.

$j.cookie('hide_banner', 'yes', { expires: 3 }); 

In this example it'll be 3 days.

17 comments

Please sign in to leave a comment.