Permalink
Browse files

Fixed 'class' variable for ie

  • Loading branch information...
1 parent 3117bb7 commit 31ed79d0faf081a11dcc02be1c97dbed813d32d9 @dknight dknight committed Jan 4, 2010
Showing with 39 additions and 40 deletions.
  1. +36 −38 index.html
  2. +3 −2 jquery.notifyBar.js
View
@@ -1,21 +1,30 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
- <title>jQuery notify bar</title>
- <link rel="stylesheet" href="jquery.notifyBar.css" type="text/css" media="screen" />
- <style type="text/css">
- .custom {
- font-size:20px;
- font-family: "Times New Roman", Times, serif;
- text-transform:uppercase;
- background:#fff url(http://www.dmitri.me/misc/jq-test-pattern.gif) repeat-x top center;
- }
- </style>
- </head>
- <body>
- <h1>'Notify Bar' plugin</h1>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>jQuery 'Notify bar'</title>
+<link rel="stylesheet" href="jquery.notifyBar.css" type="text/css" media="screen" />
+<style type="text/css">
+.custom {
+ font-size:20px;
+ font-family: "Times New Roman", Times, serif;
+ text-transform:uppercase;
+ background:#fff url(http://www.dmitri.me/misc/jq-test-pattern.gif) repeat-x top center;
+}
+</style>
+<!--[if lte IE 6]>
+<style type="text/css">
+img {
+behavior:url("/inc/iepngfix.htc");
+}
+</style>
+<link href="css/ie6.css" rel="stylesheet" type="text/css" media="screen" />
+<![endif]-->
+</head>
+
+<body>
+
+<h1>'Notify Bar' plugin</h1>
<p>
Simple plugin (basically it's not a plugin, but widget) to show notify bar
(like on Twitter's webpage).
@@ -33,8 +42,8 @@
</code>
</pre>
and to your html page stylesheet:
- <pre>
- <code>&lt;link rel="stylesheet" href="jquery.notifyBar.css" type="text/css" media="screen" /&gt;</code>
+ <pre>
+<code>&lt;link rel="stylesheet" href="jquery.notifyBar.css" type="text/css" media="screen" /&gt;</code>
</pre>
<h3>$.notifyBar can pass next parameters:</h3>
<table border="1">
@@ -69,7 +78,7 @@
<td>null</td>
</tr>
<tr>
- <td>class</td>
+ <td>cls</td>
<td>You can set own CSS class for 'Notify bar'. There is too premade clasess "error" and "success"</td>
<td>String</td>
<td></td>
@@ -92,17 +101,8 @@
<a href="http://www.dmitri.me/blog/notify-bar">Project home</a> |
<a href="http://github.com/dknight/jQuery-Notify-bar">download source</a>
</p>
- <script type="text/javascript">
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
- </script>
- <script type="text/javascript">
- var pageTracker = _gat._getTracker("UA-4197203-4");
- pageTracker._trackPageview();
- </script>
-
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
- <script type="text/javascript" src="jquery.notifyBar.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
+ <script type="text/javascript" src="jquery.notifyBar.js"></script>
<script type="text/javascript">
$(function() {
@@ -126,20 +126,18 @@
$.notifyBar({});
});
$("#error").click(function(){
- $.notifyBar({ class: "error", html: "Error occurred!" });
+ $.notifyBar({ cls: "error", html: "Error occurred!" });
});
$("#success").click(function(){
- $.notifyBar({ class: "success", html: "Your data has been changed!" });
+ $.notifyBar({ cls: "success", html: "Your data has been changed!" });
});
$("#custom").click(function(){
- $.notifyBar({ class: "custom", html: "Your data has been changed!" });
+ $.notifyBar({ cls: "custom", html: "Your data has been changed!" });
});
});
</script>
-
-
- </body>
-</html>
+</body>
+</html>
View
@@ -36,14 +36,15 @@ $.notifyBar = function(settings)
notifyBarNS.jqObject = settings.jqObject;
//Set up own class
- notifyBarNS.class = settings.class || "";
+ notifyBarNS.cls = settings.cls || "";
+
if( notifyBarNS.jqObject) {
bar = notifyBarNS.jqObject;
notifyBarNS.html = bar.html();
} else {
bar = $("<div></div>")
.addClass("jquery-notify-bar")
- .addClass(notifyBarNS.class)
+ .addClass(notifyBarNS.cls)
.attr("id", "__notifyBar");
}

0 comments on commit 31ed79d

Please sign in to comment.