Twitter like notify bar

Overview

jQuery Notify bar

Please visit the project page for feedback and other details.

Simple plugin (basically it's not a plugin, but widget) to show notify bar (like on Twitter's webpage). It's very simple to use:

Installation

> bower install jqnotifybar

Usage

jQuery(function () {
  jQuery.notifyBar({
    html: "Thank you, your settings were updated!",
    delay: 2000,
    animationSpeed: "normal"
  });  
});

Usage position at bottom


jQuery(function () {
  jQuery.notifyBar({
    html: "Hi from below!",
    cssClass: "Appear at bottom",
    position: "bottom"
  });
});

Options

Option Description Type Default
html What text will be inside bar. Can be HTML or just text. String [optional] "Your message here"
delay How long bar will be delayed, doesn't count animation time. Integer [optional] 2000
animationSpeed How long this bar will be slided up and down. String | Integer "normal"
jqObject Custom jQuery object for notify bar. jQuery object [optional] null
cssClass You can define own CSS class for Notify bar. There are too premade classes "error", "warning" and "success". String ""
close If set to true close button will be displayed. Boolean false
closeText Sets the text to close button. String "Close [X]"
closeOnClick If enabled, user can hide notify bar just by click on it. Boolean true
closeOnOver If enabled, user can hide notify bar just by moving mouse cursor on it (suitable for really lazy people). Boolean false
waitingForClose If enabled, notify bar don't close until user presses the close button. Boolean true
onBeforeShow Callback on before show. function null
onShow Callback on show. function null
onBeforeHide Callback on before hide. function null
onHide Callback on hide. function null
position Set the position of notify bar. Possible values are top, bottom. string "top"

Please visit the project page for feedback and other details.

Comments
  • Possible to show and hide bar on demand?

    Possible to show and hide bar on demand?

    Is it possible to show and hide the bar on demand?

    Something like:

    var bar = $.notifyBar({
      html: 'Hello'
    });
    bar.show(); // show bar
    bar.hide(); // hide bar
    
    opened by kunalnagar 4
  • Add package.json, convert to UMD module

    Add package.json, convert to UMD module

    This pull request is mainly to add npm support by basically copying the existing bower.json file to package.json. I also converted it to a module so that it can be used in AMD and CommonJS environments as well the already supported jQuery browser global variable.

    Quick list of changes:

    • Add package.json (module name is jqnotifybar which is not yet taken on NPM)
    • Add UMD header in order to support AMD and CommonJS modules
    • Add .gitignore to ignore node_modules and npm-error.log
    • Move license info from embedded inside README.md into LICENSE.md file
    opened by chrisbroome 2
  • Auto close even if

    Auto close even if "close" is defined

    Hello,

    First of all, thank you for sharing this amazing plugin. I think I found a (minor bug?): when the close option is defined, the notification does not disappear as expected. If it is a normal behavior, I suggest you to add another option in order to hide a notification automaticaly even if the close button is present. What do you think?

    Code example

    $.notifyBar({html: 'Message', delay: 2000, cssClass: 'notification success', close: 'X'})
    

    My workaround:

    var notif = $.notifyBar({html: msg, delay: 2000, cssClass: 'fa-notification success', close: 'X'})
    window.setTimeout(() => {
        // When hide is called, there is no animation!
        notif.hide()
    }, 2000)
    
    opened by qathom 2
  • changing bar position and slide

    changing bar position and slide

    Hi, I've tried to change css and js to make the bar appera at the bottom of the page, sliding up when open and sliding down when closed :

    1. I've used for open : bar.slideDown(asTime);

    and for close:

    if( bar.attr("id") == "__notifyBar") {
      setTimeout("jQuery('#" + id + "').slideUp(" + asTime +", function() {jQuery('#" + id + "').remove()});", notifyBarNS.delay + asTime);
    } else {
      setTimeout("jQuery('#" + id + "').slideUp(" + asTime +", function() {jQuery('#" + id + "')});", notifyBarNS.delay + asTime);
    }
    

    I've see the bar only when it gets closed.

    How to move bar at the bottom, changing top in position: absolute does not anchor the bar at the bottom of the page.

    Can you help me?

    Thank you very much! Bye Giacomo

    opened by giacomomacri 2
  • Bump jquery from 3.2.1 to 3.5.0

    Bump jquery from 3.2.1 to 3.5.0

    Bumps jquery from 3.2.1 to 3.5.0.

    Commits
    • 7a0a850 3.5.0
    • 8570a08 Release: Update AUTHORS.txt
    • da3dd85 Ajax: Do not execute scripts for unsuccessful HTTP responses
    • 065143c Ajax: Overwrite s.contentType with content-type header value, if any
    • 1a4f10d Tests: Blacklist one focusin test in IE
    • 9e15d6b Event: Use only one focusin/out handler per matching window & document
    • 966a709 Manipulation: Skip the select wrapper for <option> outside of IE 9
    • 1d61fd9 Manipulation: Make jQuery.htmlPrefilter an identity function
    • 04bf577 Selector: Update Sizzle from 2.3.4 to 2.3.5
    • 7506c9c Build: Resolve Travis config warnings
    • Additional commits viewable in compare view
    Maintainer changes

    This version was pushed to npm by mgol, a new releaser for jquery since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump jquery from 3.2.1 to 3.4.0

    Bump jquery from 3.2.1 to 3.4.0

    Bumps jquery from 3.2.1 to 3.4.0.

    Commits
    • b7fc909 3.4.0
    • 59ea765 Release: update AUTHORS.txt
    • 7c1ef15 Release: update version to 3.4.0-pre
    • d940bc0 Build: Update Sizzle from 2.3.3 to 2.3.4
    • 9b9fca4 Update README.md
    • a2a73db Tests: Make Android Browser 4.0-4.3 dimensions tests green
    • 4455f8d Tests: Make Android Browser 4.0-4.3 AJAX tests green
    • 0050403 Core: Preserve CSP nonce on scripts with src attribute in DOM manipulation
    • fe5f04d Event: Prevent leverageNative from double-firing focusin
    • 753d591 Core: Prevent Object.prototype pollution for $.extend( true, ... )
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • notifyBars should clean up after themselves

    notifyBars should clean up after themselves

    when a new notification bar is created, it would be nice to have the old bar remove itself from the dom. on an app with loads of notifications, these can build up pretty fast

    opened by lfender6445 1
  • Prevent auto hide on close btn visible

    Prevent auto hide on close btn visible

    my fork adds the possibility to prevent the auto hide on close button visible by giving the option respectHideDelay.

    If set to true the notify bar will stay open and ignore the timer which removes the bar.

    If the parameter (respectHideDelay) is not given as option the bars will be removed as normal after the time of the option delay.

    opened by straeger 0
  • A couple of updates/additions

    A couple of updates/additions

    • Fixed animation queuing
    • Added click to close (could be improved upon by making in to a user definable option)
    • The script now hides any visible bars before showing a new one
    opened by sambowler 0
  • Is this code correct??

    Is this code correct??

    Closure library warns about the following piece of code..

    if( bar != 'object'); {
      jQuery("body").prepend(bar);
    }
    

    It is from Lie 72-74.. Can you please check it once..

    opened by sp2hari 0
  • Cookie option

    Cookie option

    Could there be a cookie option in the future? That way the notification bar won't show on all pages over and over again. And thank you for making this!

    opened by kiarashi 0
Owner
Dmitri Smirnov
Dmitri Smirnov
Based on Google Chrome recorder, implement UI interface capture and notify the result to the target mailbox

chrome-recoder-crawler README-CN Modify the .js file exported by Google Chrome recorder. By default, the innerText property of the node operated in th

wudu 4 Oct 18, 2022
A GitHub app to report failed workflow job actions and notify pull request creator with custom report message for the failed workflow job.

Workflow Reporter A GitHub App built with Probot that reports failed workflow job actions and notify the pull request creator with custom report messa

Divyanshu Shekhar 14 Nov 12, 2022
Detect webpage updates and notify user to reload. support vite and umijs

English | 简体中文 plugin-web-update-notification Detect webpage updates and notify user to reload. support vite and umijs. Take the git commit hash as th

Utopia 57 Dec 26, 2022
A jQuery plug-in to notify you of CSS, Attribute or Property changes in an element

selectWatch.js jQuery plug-in gives an opportunity to monitor changes of DOM element's CSS styles, attributes, properties, input element or select ele

Fatih Kazancı 3 Oct 28, 2022
This is just a script I put together to check and notify me via email (MailGun) when there's an earlier date before my initial appointment date. It doesn't handle rescheduling.

US-visa-appointment-notifier This is just a script I put together to check and notify me via email (MailGun) when there's an earlier date before my in

Theophilus Omoregbee 13 Jan 4, 2023
Node.js script to notify stake data with Notifi Network

Created by Timur Ruziev (participant of stakewars-iii) You can see my challenge report here: https://github.com/ruziev-dev/near-stakewars-iii Getting

Timur Ruziev 6 Sep 6, 2022
Notify new channel created/renamed on Next-gen Slack platform

notify-new-channel Notify new channel created/renamed on Next-gen Slack platform Install Deploy and create triggers. slack deploy slack trigger create

Masaya Hayashi 1 Oct 10, 2022
Twitter Text Libraries. This code is used at Twitter to tokenize and parse text to meet the expectations for what can be used on the platform.

twitter-text This repository is a collection of libraries and conformance tests to standardize parsing of Tweet text. It synchronizes development, tes

Twitter 2.9k Jan 8, 2023
Fuck Twitter NFTs - Userscript to delete or block all occurances of NFT Users on Twitter

FuckTwitterNFTs Fuck Twitter NFTs - Userscript to delete or block all occurances of NFT Users on Twitter Userscript will by default, attempt to delete

Blumlaut 1 Jan 20, 2022
Twitter bot to find what song is playing in a given uploaded twitter video.

what-song-is-this Twitter bot to find what song is playing in a given uploaded twitter video. How to setup. yarn install How to run. via npm script ya

Akinwande Akinboluwarin 17 Dec 11, 2022
A Twitter filtered search to only get the live broadcasts hosted on Twitter itself, Built using Vanilla JS and Node.js

Twitter Broadcasts Search A Twitter filtered search to only get the live broadcasts hosted on Twitter itself, Built using Vanilla JS and Node.js. Live

Mohammad Mousad 2 Oct 6, 2022
A work-in-progress HTML sanitizer that strives for: performance like window.Sanitizer, readiness like DOMPurify, and ability to run in a WebWorker like neither of those.

Amuchina A work-in-progress HTML sanitizer that strives for: performance like window.Sanitizer, readiness like DOMPurify, and ability to run in a WebW

Fabio Spampinato 9 Sep 17, 2022
This project is used to extract media from various posting platfroms like Twitter, Reddit, Pixiv, Youtube and many other

Social-Picker-API This project is used to extract media from various posting platfroms like Twitter, Reddit, Pixiv, Youtube and many others. It's writ

Serge 11 Nov 29, 2022
Lets you add a character to Hacker News links to add social media and OpenGraph previews for sharing on things like Slack or Twitter.

news.ycombinator1.com Lets you add a character to Hacker News links to add social media and OpenGraph previews for sharing on things like Slack or Dis

Ian Langworth ☠ 38 Sep 18, 2022
Unfurl links into rich cards, as seen in places like Slack and Twitter

eleventy-plugin-unfurl Turn URLs into rich cards. Show a preview image, page title, description and other meta information all inside a neatly present

David Darnes 38 Dec 16, 2022
Custom touch bar or digital macropad app for GNU/Linux 🐧 using an Android device 📱

?? Boar ??️ Custom touch bar or digital macropad app for GNU/Linux ?? using an Android device ?? Those apps allow creating a keyboard with custom keys

Fabián Velosa 0 Oct 29, 2022
⌨️ Visualize keyboard history for osu! in bar form

bar-overlay-for-osu Visualize keyboard history for osu! Example Vertical Horizontal Features Customizable: keys, colors, speed, spacing, etc. Receives

solstice23 6 Oct 27, 2022
CLI Progress Bar implemented in NodeJS to track Time, ETA and Steps for any long running jobs in any loops in JS, NodeJS code

NodeJS-ProgressBar CLI Progress Bar for NodeJS and JavaScript to track Time, ETA and Steps for any long running jobs in any loops in JS, NodeJS code D

Atanu Sarkar 5 Nov 14, 2022
A rhythm game played in your browser's address bar

URLX URLX is a rhythm game played in your browser's address bar. (no it does not stand for anything it's just the best name i could think of) Hit arro

Colon 37 Dec 21, 2022