Lesley Peters Lesley Peters - 5 months ago 14
Javascript Question

PHP show notification on page load

When I click on a button it shows an amazing notification at the top of the screen. Now I want to show this notification to the user as soon as he loads the page, but how can i do this?

This is the code of the button:

<span class="btn btn-success" data-layout="top" data-type="success" data-toggle="notyfy">Success</span>


Thanks for your time.

Answer

I think you are using notyfy jquery plugin. So you can do this:

$(document).ready(function() {
  notyfy({text: 'notyfy - Yet another jQuery notification plugin'});
});