Closed alanhouser closed 11 years ago
I would probably try something like this in your footer:
$('.straplineWrapper').prependTo('#page-body-wrapper').fitText(1.2);
See if that works.
Thanks. It didn't work. Trying other variations too.
Looks like its your CMS. When I visit: https://eventsadmin.sqsp.com/s/jqueryfittext.js it downloads an HTML document not fittext, like I'd expect.
If I go into the console and type: jQuery
I should be returned a function, I get nothing.
Similarly, if fitText is being loaded, I should be able to go to the console and type $.fn.fitText
and it should return a function to me.
Ahhhh. OK. I just added the script to the header injection; jQuery loads and the
$.fn.fitText
returns function(s), but still not working as expected (or at all I guess).
At the top of the console, I see an error:
Uncaught TypeError: Object [object Object] has no method 'fitText'
— I'm not sure what that is though.
Thanks for your time!
update I added another block of code (without the jQ positioning hoops) and still not working - on https://eventsadmin.sqsp.com/about-us
If you open web inspector, you'll see that you have the following CSS defined:
#page-body-wrapper .strapline {
margin-top: -160px;
margin-bottom: -110px;
font-family: inherit;
line-height: 1.1em;
font-size: 70px !important;
font-weight: 700 !important;
letter-spacing: 1px !important;
color: #FFF !important;
text-align: center;
text-shadow: 1px 2px 1px #000;
-ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=1,OffY=2,Color=#ff000000,Positive=true)";
zoom: 1;
height: 170px;
}
The font-size: 70px !important;
is overriding FitText. Remove that !important
and it'll fix your problem. Any more issues beyond this you should take to Stack Overflow. Stack Overflow is great for learning and getting help. Github issues are more for actual problems and issues with the plugin.
animated image of a jackass laughing
Thank you so much. oof
I just had to drop in and say this was an awesome support ticket from the author, and the jackass comment was very humbling.
Too many short temptered people in the world, it's good to see a solid community here.
Hello. I've been trying to apply FitText to a div that I've positioned (prependTo) with jQ.
Hacky, sure— but I can't see why the final result wouldn't be working. ( Site: https://eventsadmin.sqsp.com pass: events )