Skip to content

Commit

Permalink
Handle fact that webkit does not use same default value for display p…
Browse files Browse the repository at this point in the history
…roperty
  • Loading branch information
deadprogram committed Oct 2, 2011
1 parent 67df352 commit 2fe73ae
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions public/js/lessons.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,22 @@ jQuery(document).ready(function($){

$('article.lesson:gt(0)').hide();
$('#next-lesson').click(function(){
var $current = $('article.lesson:visible');
var $current = $("article").filter(function() { return $(this).css("display") == "inline" || $(this).css("display") == "block" });
if($current.next('article.lesson').length == 0)
return false;

$current.slideUp(500, function(){
$(this).next().slideDown(500);
});

$current.hide();
$current.next().show();
return false;
});

$('#prev-lesson').click(function(){
var $current = $('article.lesson:visible');
var $current = $("article").filter(function() { return $(this).css("display") == "inline" || $(this).css("display") == "block" });
if($current.prev('article.lesson').length == 0)
return false;

$current.slideUp(500, function(){
$(this).prev().slideDown(500);
});

$current.hide();
$current.prev().show();
return false;
});
});

0 comments on commit 2fe73ae

Please sign in to comment.