Make fitText.js JQuery Work in Shopfiy
- or -
Post a project like this1202
$40
- Posted:
- Proposals: 10
- Remote
- #3096660
- Awarded
PPH's TOP Notch Website & Mobile App Developer & Designer(9+ yrs) ✔ Wordpress ✔ Shopify ✔ OpenCart ✔ Laravel ✔ PHP ✔ React Native ✔ Android ✔ iOS ✔ HTML/CSS✔Javascript/jQuery✔Responsive Design✔ASP.net
Lahore
Website Developer, Graphic Designer, Transcriber, Content writer, CAD Expert, Python Developer, Photo Editor, Web Scrapper, JAVA developer, Android developer, Wix/Shopify Expert,
Regensburg
26839445598369807531246413187238119004552543778306424033835033486735
Description
Experience Level: Entry
Looking for someone who can make fitText.js jQuery work with Shopify so personalized text that displays over image resizes correctly as browser's window is resized. (See image)
Sample of how to use code: https://www.youtube.com/watch?v=Q05tnz92RJo
Source code from https://github.com/davatron5000/FitText.js/blob/master/jquery.fittext.js
/*global jQuery */
/*!
* FitText.js 1.2
* Copyright 2011, Dave Rupert http://daverupert.com
* Released under the WTFPL license
* http://sam.zoy.org/wtfpl/
* Date: Thu May 05 14:23:00 2011 -0600
*/
(function( $ ){
$.fn.fitText = function( kompressor, options ) {
// Setup options
var compressor = kompressor || 1,
settings = $.extend({
'minFontSize' : Number.NEGATIVE_INFINITY,
'maxFontSize' : Number.POSITIVE_INFINITY
}, options);
return this.each(function(){
// Store the object
var $this = $(this);
// Resizer() resizes items based on the object width divided by the compressor * 10
var resizer = function () {
$this.css('font-size', Math.max(Math.min($this.width() / (compressor*10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize)));
};
// Call once to set.
resizer();
// Call on resize. Opera debounces their resize by default.
$(window).on('resize.fittext orientationchange.fittext', resizer);
});
};
})( jQuery );
Sample of how to use code: https://www.youtube.com/watch?v=Q05tnz92RJo
Source code from https://github.com/davatron5000/FitText.js/blob/master/jquery.fittext.js
/*global jQuery */
/*!
* FitText.js 1.2
* Copyright 2011, Dave Rupert http://daverupert.com
* Released under the WTFPL license
* http://sam.zoy.org/wtfpl/
* Date: Thu May 05 14:23:00 2011 -0600
*/
(function( $ ){
$.fn.fitText = function( kompressor, options ) {
// Setup options
var compressor = kompressor || 1,
settings = $.extend({
'minFontSize' : Number.NEGATIVE_INFINITY,
'maxFontSize' : Number.POSITIVE_INFINITY
}, options);
return this.each(function(){
// Store the object
var $this = $(this);
// Resizer() resizes items based on the object width divided by the compressor * 10
var resizer = function () {
$this.css('font-size', Math.max(Math.min($this.width() / (compressor*10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize)));
};
// Call once to set.
resizer();
// Call on resize. Opera debounces their resize by default.
$(window).on('resize.fittext orientationchange.fittext', resizer);
});
};
})( jQuery );
C J.
100% (2)Projects Completed
2
Freelancers worked with
1
Projects awarded
100%
Last project
23 Jan 2021
United States
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies