Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery textfill example

//<script src="jquery.min.js"></script>
//<script src="jquery.textfill.min.js"></script>
//<script>
$(function() {
    $('#my-element').textfill({
      	// AVAILABLE OPTIONS - 
      	//option: defaultValue
        minFontPixels: 4,			
      	maxFontPixels: 40,
      	innerTag: span,
      	widthOnly: false,
      	explicitWidth: null,
      	explicitHeight: null,
      	changeLineHeight: false,
      	allowOverFlow :false,
      	debug: false,
    });
});
//</script>

/*
Name				Description	
--------------------------------
minFontPixels		Minimal font size (in pixels). 
					The text will shrink up to this value.
maxFontPixels		Maximum font size (in pixels). The text will stretch up to this value.. 
                    If it's a negative value (size <= 0), 
                    the text will stretch to as big as the container can accommodate.
innerTag			The child element tag to resize. We select it by using 
					$(innerTag + ':visible:first', container)
widthOnly			Will only resize to the width restraint. 
					The font might become tiny under small containers.
explicitWidth		Explicit width to resize. 
					Defaults to the container's width.
explicitHeight		Explicit height to resize. 
					Defaults to the container's height.
changeLineHeight	Also change the line-height of the parent container. 
					This might be useful when shrinking to a small container.
allowOverflow		Allows text to overflow when minFontPixels is reached. 
					Won't fail resizing, but instead will overflow container.
debug				Output debugging messages to console.
*/
Comment

PREVIOUS NEXT
Code Example
Javascript :: jstree get not disabled nodes 
Javascript :: scriptcase javascript close modal form 
Javascript :: Checking if the first letter of the string is uppercase 
Javascript :: await multiple promises 
Javascript :: Scotch.io - Create a CRUD App with Node and MongoDB 1 Getting Started 
Javascript :: cypress replace response part 
Javascript :: is element displayed js 
Javascript :: 00979fb28f7cc517ff28c035bb8ef10698d0d991304e9901ba214ad0cada69ef:script- 
Javascript :: concat not working javascript 
Javascript :: how to make local storage read only site:stackoverflow.com 
Javascript :: React Textarea package With Editor Functionalities 
Javascript :: creating stripe token from javscript lib 
Javascript :: javascript synchronous and asynchronous list 
Javascript :: waiting for the value from use effect 
Javascript :: regular expression for beginners 
Javascript :: JAVASCRIPT EX. 
Javascript :: react spring bounce in animation 
Javascript :: pause media stream javascript 
Javascript :: react using pre new Date 
Javascript :: how to turn a time into a word js 
Javascript :: When defined as a method of an object, in a regular function this refers to the object 
Javascript :: Another _extend Example 
Javascript :: javascript foreach next item 
Javascript :: prisma nested create 
Javascript :: add item or nothing array js 
Javascript :: javascript get object list by value 
Javascript :: node package manager 
Javascript :: external routes in nodejs api 
Javascript :: how to check vowels in a string in javascript 
Javascript :: create upload preset using node.js on cloudinary 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =