Git Product home page Git Product logo

ohsnap's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ohsnap's Issues

error and typo

Hi!
First: There is a typing error in README.md in section Usage (osSnap) which causes my first test to fail with an error...

osSnap('Succefully created your account');

should be

ohSnap('Succefully created your account');

Second: The is an error in the Javascript ohsnap.js (line 45)
First appearance of variable html without var.
My Test: I have called ohSnap(..) two times one after another and not all notifications faded out after five seconds because the variable html is global without var in front of.
With var there is one variable html for each call of ohSnap(..) which is used later in setTimeout(ohSnapX..).

// Generate the HTML
html = $('<div class="alert ' + color_markup + '">' + icon_markup + text + '</div>').fadeIn(options['fade-duration']);

should be

// Generate the HTML
var html = $('<div class="alert ' + color_markup + '">' + icon_markup + text + '</div>').fadeIn(options['fade-duration']);

Best
Martin

Sorry for my bad english!

Multiple Alerts not disappearing

When a notification is called more than once, without interruption,(for example 7 in a row) you get notifications that don't fade out, they stay there sticked, only when you click them they disappear. (sorry for my english)

Option to change the ".alert" class

As far as I can see there's no option to change the default ".alert" class for a single message.

It would be useful to add an option to modify this class, since I'm actually working with bootstrap and customization of the ".alert" class also overrides the bootstrap alert boxes styling.

I would make the ".alert" class the default option if the user does not define the class.

.live is deprecated in jQuery 2

.live is deprecated in jQuery 2+...

I've been able to replace it with (line 44)

$(document).on('click', '.alert', function() { 
  ohSnapX($(this));
});

which is supported 1.7+. Works for me but is not fully tested.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.