notifyMe is a simple plugin that i created for fun and learning for fixed notifications in pages. He works when a button is clicked, errors, validations, info and everything you want.
notifyMe is a simple plugin that i created for fun and learning for fixed notifications in pages. He works when a button is clicked, errors, validations, info and everything you want.
Open terminal, in the path of project, install the gulp
$ npm install --save-dev gulp
After install gulp, install gulp-sass-ruby
(read documentation).
$ npm install --save-dev gulp-ruby-sass
In gulpfile.js
we have just one task for compile sass. Write in terminal:
$ gulp compile-sass
or gulp watch
for watch the changes and auto compile:
$ gulp watch
Call the stylesheet with the styles
<link rel="assets/css/notifyme.css" type="text/css" />
For use this plugin is necessary add jQuery lib in your page:
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
Add the notifyMe.js after jquery lib:
<script type="text/javascript" src="assets/js/notifyme.js"></script>
in a element is simple, for use when click in a button for example:
$('.error').on('click', function(){
$(this).notifyMe(
'bottom', // Position
'error', // Type
'Lorem Ipsum Text', // Title
'Lorem ipsum dolos lorem uisnsnd h jsakdh ajkdbh', // Description
200 // Velocity of notification
2000 // (optional) Time of delay to close automatically
);
});