Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Schroter committed Jan 27, 2013
1 parent 5492e39 commit ab7af6e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions assests/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ a:hover {
font-size: 1.25em;
font-weight: 200;
text-shadow: 0.1em 0.1em 0.1em rgba(0, 0, 0, 0.8);
visibility: hidden;
}

.jumbotron .btn {
Expand Down
6 changes: 4 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ <h2>Credits</h2>
<div class="grid grid-pad">
<section class="col-1-1">
<h2>Examples</h2>
<div class="grid grid-pad">

</div>
</section>
</div>
<div class="grid grid-pad">
Expand Down Expand Up @@ -96,7 +99,7 @@ <h2>Dependencies</h2>
<script>

$(function (){
var animateClasses = "flash bounce shake tada swing wobble pulse flip flipInX flipOutX flipInY flipOutY fadeIn fadeInUp fadeInDown fadeInLeft fadeInRight fadeInUpBig fadeInDownBig fadeInLeftBig fadeInRightBig fadeOut fadeOutUp fadeOutDown fadeOutLeft fadeOutRight fadeOutUpBig fadeOutDownBig fadeOutLeftBig fadeOutRightBig bounceIn bounceInDown bounceInUp bounceInLeft bounceInRight bounceOut bounceOutDown bounceOutUp bounceOutLeft bounceOutRight rotateIn rotateInDownLeft rotateInDownRight rotateInUpLeft rotateInUpRight rotateOut rotateOutDownLeft rotateOutDownRight rotateOutUpLeft rotateOutUpRight hinge rollIn rollOut";
var animateClasses = 'flash bounce shake tada swing wobble pulse flip flipInX flipOutX flipInY flipOutY fadeIn fadeInUp fadeInDown fadeInLeft fadeInRight fadeInUpBig fadeInDownBig fadeInLeftBig fadeInRightBig fadeOut fadeOutUp fadeOutDown fadeOutLeft fadeOutRight fadeOutUpBig fadeOutDownBig fadeOutLeftBig fadeOutRightBig bounceIn bounceInDown bounceInUp bounceInLeft bounceInRight bounceOut bounceOutDown bounceOutUp bounceOutLeft bounceOutRight rotateIn rotateInDownLeft rotateInDownRight rotateInUpLeft rotateInUpRight rotateOut rotateOutDownLeft rotateOutDownRight rotateOutUpLeft rotateOutUpRight hinge rollIn rollOut';

var $form = $('.playground form')
, $viewport = $('.playground .viewport');
Expand All @@ -110,7 +113,6 @@ <h2>Dependencies</h2>
, type = $this.data('type');

data[type][key] = $this.is(':checkbox') ? $this.is(':checked') : $this.val();

});

return data;
Expand Down
22 changes: 11 additions & 11 deletions jquery.textillate.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,10 @@
.text(base.$texts.find(':first-child').text())
.prependTo($element);

if (isInEffect(options.in.effect)) {
base.$current.css('visibility', 'hidden');
} else if (isOutEffect(options.in.effect)) {
base.$current.css('visibility', 'visible');
}

base.setOptions(options);

setTimeout(function () {
// base.$current.css('visibility', 'visible');
base.start();
base.options.autoStart && base.start();
}, base.options.initialDelay)
};

Expand All @@ -126,6 +119,12 @@
base.start = function (index) {
var $next = base.$texts.find(':nth-child(' + (index || 1) + ')');

if (isInEffect(base.options.in.effect)) {
base.$current.css('visibility', 'hidden');
} else if (isOutEffect(base.options.in.effect)) {
base.$current.css('visibility', 'visible');
}

(function run ($elem) {
var options = $.extend({}, base.options, getData($elem));

Expand Down Expand Up @@ -177,16 +176,16 @@
}


$.fn.textillate = function (settings) {
$.fn.textillate = function (settings, args) {
return this.each(function () {
var $this = $(this)
, data = $this.data('textillate')
, options = $.extend(true, {}, $.fn.textillate.defaults, getData(this), typeof settings == 'object' && settings);

if (!data) {
$this.data('textillate', (data = new Textillate(this, options)));
} else if (typeof option == 'string') {
data[option].apply(data, [].concat(args));
} else if (typeof settings == 'string') {
data[settings].apply(data, [].concat(args));
} else {
data.setOptions.call(data, options);
}
Expand All @@ -212,6 +211,7 @@
sync: false,
shuffle: false,
},
autoStart: true,
inEffects: [],
outEffects: [ 'hinge' ]
};
Expand Down

0 comments on commit ab7af6e

Please sign in to comment.