Skip to content

Commit

Permalink
Fixing test issue in Opera, where selector .no_id:first returns emp…
Browse files Browse the repository at this point in the history
…ty jQuery for some quite strange reason, even if there positively is one element with class `no_id`, which is proven by correct matching the element without the `:first` selector. This has been failing regardless jQuery version. Adds to GH-33 fixes.
  • Loading branch information
pisi committed May 8, 2011
1 parent cdd9cc8 commit 51b50f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/unit/api.js
Expand Up @@ -118,7 +118,7 @@
equal( $.reel.instances.length, 2, '... and gets correctly cleaned from `$.reel.instances`');

// And then, teardown the rest
$('#image2, .no_id:first .jquery-reel').trigger('teardown');
$('.jquery-reel').trigger('teardown');
equal( $.reel.instances.length, 0, '... and gets correctly cleaned from `$.reel.instances`');

});
Expand All @@ -127,7 +127,7 @@
{

$('#image2, #image').reel();
$('#image_width_only, .no_id:first').reel();
$('#image_width_only, .no_id').reel();

equal( $.reel.instances.length, 4, 'We\'ve just setup 4 instances (2 + 2)');
equal( $.reel.instances.first().attr('id'), 'image', '`.first()` returns the oldest (by ID)');
Expand Down

0 comments on commit 51b50f8

Please sign in to comment.