Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Factor out showIncremental function
  • Loading branch information
bgentry committed Sep 26, 2011
1 parent df260ea commit dc1b76c
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions public/js/showoff.js
Expand Up @@ -252,6 +252,16 @@ function determineIncremental()
})
}

function showIncremental(incr)
{
elem = incrElem.eq(incrCurr)
if (incrCode && elem.hasClass('command')) {
incrElem.eq(incrCurr).css('visibility', 'visible').jTypeWriter({duration:1.0})
} else {
incrElem.eq(incrCurr).css('visibility', 'visible')
}
}

function prevStep()
{

Expand All @@ -277,17 +287,12 @@ function nextStep()
slidenum++
return showSlide()
} else {
elem = incrElem.eq(incrCurr)
if (incrCode && elem.hasClass('command')) {
incrElem.eq(incrCurr).css('visibility', 'visible').jTypeWriter({duration:1.0})
} else {
incrElem.eq(incrCurr).css('visibility', 'visible')
}
incrCurr++;
showIncremental(incrCurr);
var incrEvent = jQuery.Event("showoff:incr");
incrEvent.slidenum = slidenum;
incrEvent.incr = incrCurr;
$(currentSlide).find(".content").trigger(incrEvent);
incrCurr++;
}
}

Expand Down

0 comments on commit dc1b76c

Please sign in to comment.