Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

v0.3

  • Loading branch information...
commit 5ecaa12958a0fbb1f20f546edc8420997edbdca5 1 parent 252ce72
@madrobby authored
Showing with 13 additions and 13 deletions.
  1. +1 −1  Rakefile
  2. +1 −1  src/zepto.js
  3. +3 −3 test/fx.html
  4. +8 −8 test/zepto.html
View
2  Rakefile
@@ -1,7 +1,7 @@
require 'rake'
require 'rake/packagetask'
-ZEPTO_VERSION = "0.2"
+ZEPTO_VERSION = "0.3"
ZEPTO_ROOT = File.expand_path(File.dirname(__FILE__))
ZEPTO_SRC_DIR = File.join(ZEPTO_ROOT, 'src')
View
2  src/zepto.js
@@ -125,7 +125,7 @@ var Zepto = (function() {
},
toggleClass: function(name, when){
return this.each(function(element){
- ((when !== undefined && !when) || $(element).hasClass(name)) ?
+ ((when !== undefined && !when) || $(element).hasClass(name)) ?
$(element).removeClass(name) : $(element).addClass(name)
});
}
View
6 test/fx.html
@@ -16,7 +16,7 @@
<div id="animtest" style="width:40px;height:40px;background:red"></div>
<div id="durationtest_1" style="width:40px;height:40px;background:red"></div>
<div id="durationtest_2" style="width:40px;height:40px;background:red"></div>
-
+
<script>
Evidence.TestCase.extend('ZeptoFXTest', {
@@ -32,7 +32,7 @@
t.assertEqual('ease-out', el.style.webkitTransitionTimingFunction);
t.assertEqual('0.5', el.style.opacity);
},
-
+
testDuration: function(t){
$('#durationtest_1').anim({
translate3d: '100px, 100px, 100px',
@@ -40,7 +40,7 @@
opacity: 0.5
});
t.assertEqual('0.5s', $('#durationtest_1').get(0).style.webkitTransitionDuration);
-
+
$('#durationtest_2').anim({
translate3d: '100px, 100px, 100px',
rotateZ: '90deg',
View
16 test/zepto.html
@@ -96,7 +96,7 @@
var globalVarSetFromReady = "";
$(document).ready(function(){ globalVarSetFromReady = 'hi!' });
-
+
var gloablVarSetFromReady2 = "";
$(function(){ globalVarSetFromReady2 = 'hi!' });
@@ -232,13 +232,13 @@
t.assertEqual(0, $('blah').get().length);
t.assertEqual(0, $('blah').first().get().length);
},
-
+
testLast: function(t){
var zepto = $('h1,p');
t.assertEqual(5, zepto.get().length);
zepto.last();
-
+
t.assertEqual(1, zepto.get().length);
t.assertEqual('P', zepto.get(0).tagName);
@@ -615,17 +615,17 @@
t.assertEqual('name', els.attr("data-name"));
t.assertEqual('id', $('#attr_2').attr('data-id'));
},
-
+
testAttrOnInputFieldWithTypeOfText: function(t) {
var els = $('#attr_with_text_input');
-
+
t.assertEqual(els.get(0).value, els.attr('value'));
t.assertEqual('Hello World', els.attr('value'));
-
+
els.attr('value', '');
t.assertEqual(els.get(0).value, els.attr('value'));
t.assertEqual('', els.attr('value'));
-
+
},
testChaining: function(t){
@@ -739,7 +739,7 @@
$('#toggle_element').toggleClass('orange', false);
t.assert(!$('#toggle_element').hasClass('orange'));
-
+
$('#toggle_element').toggleClass('orange', true);
t.assert($('#toggle_element').hasClass('orange'));
},
Please sign in to comment.
Something went wrong with that request. Please try again.