Permalink
Browse files

fix a bug for IE7, and some minor code cleaning

  • Loading branch information...
1 parent ceea63d commit b3db791b0d456d000ed8074c0a4d242a23e827bf @pure committed Sep 30, 2012
Showing with 21 additions and 22 deletions.
  1. +11 −11 index.html
  2. +2 −2 js/demo.js
  3. +2 −2 libs/pure.js
  4. +4 −4 libs/pure_min.js
  5. +1 −2 tutorial/fp.html
  6. +1 −1 tutorial/tuto8.html
View
@@ -19,14 +19,14 @@
<a href="http://github.com/pure/pure/tree/version2" style="float:right;margin:1em">Project site &amp; Download</a>
<div id="chooseLib">
Choose a library to run the examples with:<br />
- <a class="lib" href="javascript:void(0)" onclick="loadLib('dojo');">dojo</a>
- <a class="lib" href="javascript:void(0)" onclick="loadLib('domassistant');">DomAssistant</a>
- <a class="lib" href="javascript:void(0)" onclick="loadLib('jquery');">jQuery</a>
- <a class="lib" href="javascript:void(0)" onclick="loadLib('mootools');">Mootools</a>
- <a class="lib" href="javascript:void(0)" onclick="loadLib('prototype');">Prototype</a>
- <a class="lib" href="javascript:void(0)" onclick="loadLib('sizzle');">Sizzle</a>
- <a class="lib" href="javascript:void(0)" onclick="loadLib('sly');">Sly</a> -
- <a class="lib" href="javascript:void(0)" onclick="loadLib('pure');">PURE Alone (modern browsers only)</a>
+ <a class="lib" href="javascript:" onclick="loadLib('dojo');">dojo</a>
+ <a class="lib" href="javascript:" onclick="loadLib('domassistant');">DomAssistant</a>
+ <a class="lib" href="javascript:" onclick="loadLib('jquery');">jQuery</a>
+ <a class="lib" href="javascript:" onclick="loadLib('mootools');">Mootools</a>
+ <a class="lib" href="javascript:" onclick="loadLib('prototype');">Prototype</a>
+ <a class="lib" href="javascript:" onclick="loadLib('sizzle');">Sizzle</a>
+ <a class="lib" href="javascript:" onclick="loadLib('sly');">Sly</a> -
+ <a class="lib" href="javascript:" onclick="loadLib('pure');">PURE Alone (modern browsers only)</a>
<p>Or look at the source code of the tutorials:</p>
<ul>
<li>Automatic rendering(autoRender):
@@ -184,7 +184,7 @@
<div class="template">
<ul class="treeItem">
<li>
- <a class="name" href="javascript:void(0)">name</a>
+ <a class="name" href="javascript:">name</a>
<div class="children"></div>
</li>
</ul>
@@ -203,7 +203,7 @@
In <span class="tz"></span>
</div>
</div>
-<p><a href="javascript:void(0)" onclick="clearTimeout(_to);">stop it!</a></p>
+<p><a href="javascript:" onclick="clearTimeout(_to);">stop it!</a></p>
</li>
@@ -227,7 +227,7 @@
<tbody><tr><td></td></tr></tbody>
</table>
</div>
-<a href="javascript:void(0)" onclick="clearTimeout(_to10);this.style.visibility='hidden';">stop it!</a>
+<a href="javascript:" onclick="clearTimeout(_to10);this.style.visibility='hidden';">stop it!</a>
</li>
<li class="ex10">
View
@@ -44,7 +44,7 @@ var loadLib, runAll, run, transform;
//initialise the lib
currLib !== 'pure' && $p.libs[currLib]();
- document.getElementById( 'libLoaded' ).innerHTML = '<b>'+ currLib + '</b> is loaded<br />You can run the examples below individually or <a href="javascript:void(0)" onclick="runAll(this);">all at once</a><br />';
+ document.getElementById( 'libLoaded' ).innerHTML = '<b>'+ currLib + '</b> is loaded<br />You can run the examples below individually or <a href="javascript:" onclick="runAll(this);">all at once</a><br />';
document.getElementById( 'examples' ).style.display = 'block';
var lis = $p( 'ul.exampleList li' ),
@@ -70,7 +70,7 @@ var loadLib, runAll, run, transform;
window[cn].id = cn;
span.id = cn;
span.innerHTML =
- '<a class="run" href="javascript:void(0)" onclick="run(this, '+cn+');">Run</a>';
+ '<a class="run" href="javascript:" onclick="run(this, '+cn+');">Run</a>';
}
}
}
View
@@ -7,7 +7,7 @@
Copyright (c) 2012 Michael Cvilic - BeeBole.com
Thanks to Rog Peppe for the functional JS jump
- revision: 2.77
+ revision: 2.78
*/
var $p = function(){
@@ -308,7 +308,7 @@ $p.core = function(sel, ctxt, plugins){
attName = isClass ? 'className' : attr;
setstr = function(node, s) {
node.setAttribute(attPfx + attr, s);
- if ( node.hasOwnProperty(attName) && !isStyle) {
+ if ( node[attName] && !isStyle) {
try{node[attName] = '';}catch(e){} //FF4 gives an error sometimes
}
if (node.nodeType === 1) {
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1,5 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
+<!DOCTYPE html>
<html>
<head>
View
@@ -7,7 +7,7 @@
<body>
<ul class="treeItem">
<li>
- <a class="name" href="javascript:void(0)">name</a>
+ <a class="name" href="javascript:">name</a>
<div class="children"></div>
</li>
</ul>

0 comments on commit b3db791

Please sign in to comment.