From 29d7da1b78ed9d9b93dc0a87d60b48fcbcd6671e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Barbero=20Rodr=C3=ADguez?= Date: Tue, 10 Apr 2012 13:32:12 +0300 Subject: [PATCH] Bug searching the template by index --- src/jquery.notify.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/jquery.notify.js b/src/jquery.notify.js index dd1d748..db70ad2 100644 --- a/src/jquery.notify.js +++ b/src/jquery.notify.js @@ -41,7 +41,14 @@ template = null; } - var tpl = this.templates[ template || this.keys[0]]; + + var tpl; + if (isNaN(template)){ + tpl = this.templates[ template || this.keys[0]]; + }else{ + tpl = this.templates[ this.keys[template]]; + } + // remove default styling class if rolling w/ custom classes if(opts && opts.custom){