Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to set compressor ratios individually for every element #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zraly
Copy link

@zraly zraly commented Dec 14, 2013

By setting data-fittext-kompressor attribute.
For example, data-fittext-kompressor="0.5" sets compressor value for the element to 0.5

By setting data-fittext-kompressor attribute. 
For example, data-fittext-kompressor="0.5" sets compressor value for the element to 0.5
@davatron5000
Copy link
Owner

I really like this! I think it maybe makes sense to only create one compressor variable inside the return $.each() rather than having two very similar (named) variables in memory. Thoughts?

@zraly
Copy link
Author

zraly commented Jan 8, 2014

I am not so good in JS to write it in this hard-skill way, so please improve it as you think. But I am very happy I could help.

@gregaltuna
Copy link

I don't know, really. I just know it's awesome being able to set min/max and compression for each when you're using the plugin outside of Drupal. I was just thinking it's be nice to have those components built into the UI instead of simply a box to list selectors. That's just my 2 cents ;-)

On Jan 7, 2014, at 7:50 PM, Dave Rupert notifications@github.com wrote:

I really like this! I think it maybe makes sense to only create one compressor variable inside the return $.each() rather than having two very similar (named) variables in memory. Thoughts?


Reply to this email directly or view it on GitHub.

@kenhowardpdx
Copy link

I'm doing something outside of FitText that may be helpful to someone...

    $('.fittext, .fit-text, h1 span, h2 span, h3 span, h4 span, h5 span, h6 span').each(function() {
        $(this).fitText($(this).data('compress'));
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants