Closed florian-oefner closed 10 years ago
<script>
jQuery('#headline_main').fitText(1.2);
jQuery('#headline_second').fitText(1.2);
</script>
Make sure jQuery is loaded
Hi, thanks for your tips. I´m sorry I totally forgot to include a jsfiddle.
Here is it now: http://jsfiddle.net/9Lvte2nb/ And the fullscreen mode for better showcase of the problem: http://jsfiddle.net/9Lvte2nb/embedded/result/
@dcondrey I tried what you suggested (as you can see in the fiddle), but didn´t help either. JSFiddle isn´t throwing an Uncaught TypeError, but it still doesn´t work. At least in Chrome on my machine.
Has anyone a clue whats going on?
Thanks a lot
The issue is really easy. It's just a problem you did this in the css:
header h1 {
font-size: 5.2rem !important;
Since it's tagged as !important
, It doesn't get changed. Issue closed, I think?
Related issue: https://github.com/davatron5000/FitText.js/issues/88
Thanks for your help! I don´t know why I have missed this mistake.
It works fine now. The uncaught type error I mentioned occured because fittext.js wasn´t loaded when I called the function.
Thank you very much to all of you that helped!
Hi,
Chrome is throwing Uncaught TypeError: undefined is not a function all the time. I initialized just like described and used jquery v.2.1.1. I even tried the vanilla js plugin, but I got the same error.
I´m using it together with Foundation & Modernizer if that matters.
Here´s the code: