![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
jquery-adaptText
Advanced tools
A jQuery plugin that help rescale text depending on it's container width.
A jQuery plugin that help rescale text depending on it's container width.
dist/
├── jquery-adaptText.js
├── jquery-adaptText.es.js
└── jquery-adaptText.min.js
Several quick start options are available:
bower install jquery-adaptText --save
npm install jquery-adaptText --save
yarn add jquery-adaptText
If you want build from source:
git clone git@github.com:amazingSurge/jquery-adaptText.git
cd jquery-adaptText
npm install
npm install -g gulp-cli babel-cli
gulp build
Done!
jquery-adaptText
requires the latest version of jQuery
.
<script src="/path/to/jquery.js"></script>
<script src="/path/to/jquery-adaptText.js"></script>
<p class="responsive">Hello world</p>
<p class="responsive" data-compression="10" data-max="100" data-min="10">Hello world</p>
<h1 class="responsive" data-scrollable="true">Long Text With Scrollable Support</h1>
All you need to do is call the plugin on the element:
jQuery(function($) {
$('.responsive').adaptText();
});
There are some example usages that you can look at to get started. They can be found in the examples folder.
jquery-adaptText
can accept an options object to alter the way it behaves. You can see the default options by call $.adaptText.setDefaults()
. The structure of an options object is as follows:
{
compression: 10,
max: Number.POSITIVE_INFINITY,
min: Number.NEGATIVE_INFINITY,
scrollable: false,
scrollSpeed: 1000,
scrollResetSpeed: 300,
onResizeEvent: true
}
Methods are called on adaptText instances through the adaptText method itself. You can also save the instances to variable for further use.
// call directly
$().adaptText('resize');
// or
var api = $().data('adaptText');
api.resize();
Resize the font size.
$().adaptText('resize');
Enable the resize functions.
$().adaptText('enable');
Disable the resize functions.
$().adaptText('disable');
jquery-adaptText
provides custom events for the plugin’s unique actions.
$('.the-element').on('adaptText::ready', function (e) {
// on instance ready
});
Event | Description |
---|---|
ready | Fires when the instance is ready for API use. |
enable | Fired immediately when the enable instance method has been called. |
disable | Fired immediately when the disable instance method has been called. |
If you have to use other plugin with the same namespace, just call the $.adaptText.noConflict
method to revert to it.
<script src="other-plugin.js"></script>
<script src="jquery-adaptText.js"></script>
<script>
$.adaptText.noConflict();
// Code that uses other plugin's "$().adaptText" can follow here.
</script>
Tested on all major browsers.
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
---|---|---|---|---|---|
Latest ✓ | Latest ✓ | Latest ✓ | Latest ✓ | 9-11 ✓ | Latest ✓ |
As a jQuery plugin, you also need to see the jQuery Browser Support.
Anyone and everyone is welcome to contribute. Please take a moment to
review the guidelines for contributing. Make sure you're using the latest version of jquery-adaptText
before submitting an issue. There are several ways to help out:
jquery-adaptText
is built modularly and uses Gulp as a build system to build its distributable files. To install the necessary dependencies for the build system, please run:
npm install -g gulp
npm install -g babel-cli
npm install
Then you can generate new distributable files from the sources, using:
gulp build
More gulp tasks can be found here.
To see the list of recent changes, see Releases section.
Copyright (C) 2016 amazingSurge.
Licensed under the LGPL license.
FAQs
A jQuery plugin that help rescale text depending on it's container width.
The npm package jquery-adaptText receives a total of 3 weekly downloads. As such, jquery-adaptText popularity was classified as not popular.
We found that jquery-adaptText demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.