Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- $(".entry-title a").lettering();
- $.fn.stripTags = function() { return this.replaceWith( this.html().replace(/<\/?[^>]+>/gi, '') ); };
- $("span").each(function(i, el) {
- var html = $(el).html().replace(/\s+/, "");
- if ($(el).is(":empty") || html.length == 0)
- $(el).stripTags();
- });
- var c = [ 'grey','green','blue','lightBlue','orange', 'red' ];
- $(".entry-title a span").randomClass( c, { randomness: 'successive', removeClasses: true } );
- $(".entry-title").each(function () {
- var charLength = $(this).text().length;
- if (charLength >= 1) $(this).css({'font-size' : '100px', 'line-height' : '70px'});
- if (charLength >= 9) $(this).css({'font-size' : '95px', 'line-height' : '65px'});
- if (charLength >= 11) $(this).css({'font-size' : '90px', 'line-height' : '60px'});
- if (charLength >= 13) $(this).css({'font-size' : '85px', 'line-height' : '55px'});
- });
- });
Add Comment
Please, Sign In to add comment