jQuery Easing Plugin

Overview

jQuery Easing Plugin

What is it? A jQuery plugin from GSGD to give advanced easing options. More info here

For CDN please use CloudFlare https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js to help my host. Thank you.

AMD or CommonJS usage

// CommonJS
const jQuery = require('jquery');
require('jquery.easing')(jQuery);

// AMD
define(['jquery', 'jquery.easing'], function (jQuery, easing) {
	easing(jQuery);
});

Building and testing

  • Clone the repo
  • npm install
  • Make changes
  • Test against files in /examples
  • Build minified version with npm run build
Comments
  • BUG with new version of jquery easing

    BUG with new version of jquery easing

    Hi,

    I am updating some of my plugin but some weird bug is happening with jquery easing. Using the old version (1.3) the problem does not happen, using the new version the problem happens.

    Both codes below are absolutely exactly the same. Nothing is different except the version of jquery easing.

    https://quemfazsite.com.br/temp/teste-old-easing.php https://quemfazsite.com.br/temp/teste-new-easing.php

    Open the first link (old) and click GO1 and GO2. You will see an animation in the background color. When you open the second link and click in GO1 and GO2 you will see the animation works strangely, a black background appears in the element.

    The strangest thing here is that I am not even using EASING in this page! The animation is being done with the default, LINEAR but no other fancy easing is being used and even so jquery easing messes with the animation.

    Can we expect a solution soon?

    Bug 
    opened by batata004 4
  • Your BSD license is not compatible with GPL and cant be used in WordPress

    Your BSD license is not compatible with GPL and cant be used in WordPress

    I wanted to use your script in a WordPress theme and because of the BSD license this is not possible. There are few BSD licensees that are compatible with GPL but it has to be specified. Right now your license is global and says only BSD so it falls under OriginalBSD.

    Here is what your license is currently referring to https://www.gnu.org/licenses/license-list.en.html#OriginalBSD

    Any way you can change this to GPL compatible license so that we can use it in WordPress?

    opened by danyj 3
  • Low quality source code

    Low quality source code

    The source code of this library is written as if it were minified code, and it also has lots of redundant logic problems. I'm trying to expand this into non-jQuery functions to use in another library which is why I've discovered these cases.

    For example these lines of code:

    https://github.com/gdsmith/jquery.easing/blob/master/jquery.easing.js#L104-L111

    There's a few things here that are undesirable in source code:

    • One letter variable names, including the fn parameters, making debugging difficult / impossible. Fortunately this StackOverflow answer is helpful.
    • The highlighted function first hard codes var p = 0; and then checks if (!p) p=d*(.3*1.5);. Things like this could be avoided for efficiency, and make the source code more readable.
    • Incorrect javascript scoping is used, in the same function var s=1.70158; and then else var s = you can see s is redefined incorrectly using a second var declaration
    • Inline operators are used in if statements such as if ((t/=d/2)==2) which mutates the variable t in place, making tracing code unnecessarily difficult.
    • In general these functions aren't written like source code. They're written like (poorly) hand optimized, (poorly) hand minified functions that would be better left to Uglify or Closure Compiler work on them.

    Since these functions have clearly stood the test of time the logic in them is sound and doesn't need to change for the library to work. For a learning opportunity, however, there is much room for improvement.

    opened by AndrewRayCode 3
  • Creating this plugin to be AMD compliant?

    Creating this plugin to be AMD compliant?

    This is more of a comment/query. I am trying to include this plugin using requirejs and I am having a lot of issues with this loading. I have tried to shim it but with no luck. Will this plugin be rewritten to be AMD compliant?

    opened by nmatthew123 3
  • Wasnt sure how else to get in touch with you.

    Wasnt sure how else to get in touch with you.

    I was using your easing script on a site I made. You put up a notification and linked me to an other one I could use. Just wanted to say thank you and sorry for any inconvenience I may have caused. I'm new to javascript and I didnt know it was a problem to link to your script. Ive updated my code to point to the link you sent.

    Really sorry, and thanks again.

    opened by Garronalpha 3
  • Add check for jQuery slim version

    Add check for jQuery slim version

    jQuery has released with jQuery 3.1.1 a 'slim' version that excludes easing. jQuery Easing Plugin tries to preserve the original jQuery 'swing' easing by default. A check was added to prevent error messages.

    opened by dheckl 2
  • License document

    License document

    Hey, Thanks for the good effort in building this library. We would like to use your node in our project.

    Can you let us know what license have been assigned to this library?

    Thanks Kandy

    opened by Kandy16 2
  • Include `integrity` hash

    Include `integrity` hash

    It'd also be nice to have your file(s)' CDN integrity hash on Github, so that one can confirm the integrity at the source of what any particular CDN is serving.

    opened by brettz9 1
  • Link to LICENSE in jquery.easing.js is not correct

    Link to LICENSE in jquery.easing.js is not correct

    opened by viniciusfacco 1
  • Require jquery.easing returns blank object?

    Require jquery.easing returns blank object?

    When searching for jquery.easing in the node.js modules folder, I couldn't find it, and when I require it, it just returns a blank object. Does the module still work?

    opened by FireController1847 1
  • Google PageSpeed reports that the minified version needs optimizing further

    Google PageSpeed reports that the minified version needs optimizing further

    Google pagespeed report:

    Minify JavaScript Compacting JavaScript code can save many bytes of data and speed up downloading, parsing, and execution time. Minify JavaScript for the following resources to reduce their size by 991B (53% reduction). Minifying https://cdnjs.cloudflare.com/…s/jquery-easing/1.3/jquery.easing.min.js could save 991B (53% reduction) after compression.

    Improving the min.js version improves PageSpeed score and therefore your SEO

    opened by whiztler 1
  • Bump minimist from 1.2.5 to 1.2.6

    Bump minimist from 1.2.5 to 1.2.6

    Bumps minimist from 1.2.5 to 1.2.6.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • TypeError: Cannot read property 'swing' of undefined

    TypeError: Cannot read property 'swing' of undefined

    Hi,

    I have installed jQuery and Jquery.easing modules in a project but I am getting below error when run the page.

    at /node_modules/jquery.easing/jquery.easing.js:22:28 at /node_modules/jquery.easing/jquery.easing.js:15:13 at Object. (/node_modules/jquery.easing/jquery.easing.js:19:3) at Module._compile (internal/modules/cjs/loader.js:1176:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10) at Module.load (internal/modules/cjs/loader.js:1040:32) at Function.Module._load (internal/modules/cjs/loader.js:929:14) at Module.require (internal/modules/cjs/loader.js:1080:19) at require (internal/modules/cjs/helpers.js:72:18) at eval (webpack-internal:///jquery.easing:1:18)

    I seriously dont know what the cause of this issue.

    Please help me to resolve this issue

    opened by naga-wb 1
  • ESM

    ESM

    Builds on #40 (dropping bower).

    • Enhancement: Derive main easing files (including minified) from ESM source, with main ones assuming global jQuery
    • Enhancement: Add module, exports, browser, and type for ESM usage by bundlers or Node
    • Enhancement: Have CommonJS API require passing in jquery instance (passing in alone not sufficient)
    • Docs/Demo: Add Node CJS demo; give more on usage
    • Linting: More consistent styling
    • Refactoring: Switch to ES6 Modules in source
    • Refactoring: More ES6 in source
    • npm: Update jquery dep.; remove uglify-js (using Terser with Rollup)

    A couple notes:

    1. If you are open to it, I can move the jquery.easing.js and jquery.easing.min.js to a new dist folder, as that should make things a bit cleaner, though it would increase breakage as the path would change.
    2. Since jQuery doesn't yet fully support ESM (e.g., see https://github.com/jquery/jquery/issues/4592 ), using import statements against jQuery in source would need our adding Rollup's commonjs plugin, and it would have the disadvantage of baking in a specific version of jQuery, adding to bundle size (unless we kept the import statement as an import statement, but then users would have to do their own bundling based on our bundle which isn't very convenient). So, currently, even one of the ESM source files relies on a jQuery global, though there is also another source file addJQueryEasing.js (in source at src/addJQueryEasing.mjs) which allows one to pass in one's own jQuery instance if that is desired. jQuery's current lack of proper ESM export is another reason I didn't bother with a native Node ESM demo, though I tentatively added such support in package.json (by the type and exports fields).
    3. I changed the API for CJS to require passing in a jQuery instance. This is because one really must have some DOM built to use in Node, e.g., with jsdom to get things working properly (I added a demo that executes without error, but as it is in Node, there is of course no visual effect). Note that CJS support had been broken until recently anyways, so I don't think this necessitates a breaking change (nor, as a result, should I think the addition of exports be so, even though it normally would be a breaking change since it prevents Node access to other files--but it wouldn't of course impact browser use even if installed by npm). module and browser can be breaking changes too, but I think they are targeting the files that should be expected.
    4. Although I didn't do so, we could add jquery as a peer dependency for Node usage, but Node really needs custom tooling like jsdom as well, so maybe better to avoid the hassle of having to keep peerDependencies up to date.
    5. While I added a few more linting rules for consistent styling, I'd be happy to apply a more rigorous config, e.g., standard, airbnb, etc., if you like.
    opened by brettz9 0
  • npm and tag consistency

    npm and tag consistency

    I see there is a tag for 1.4.2, but that tag updated package.json, bower.json, etc. to 1.4.1 instead (and the npm package doesn't have all of that commit's changes either). Could we get a new release where the tag reflects the npm package version? Thanks!

    opened by brettz9 2
  • TypeScript version with type definitions

    TypeScript version with type definitions

    Hi All,

    Thank you for your time making this project available!

    Today I was doing some experiments on a TS project and I've converted the source to TypeScript.

    https://gist.github.com/slig/145d7333052b7b2532f90d9f47e20d8e

    In the end I decided I'll stick with the default swing from jQuery, but I thought the source might be useful for someone else.

    Just to be clear, I don't expect the project to be converted to TS. I'm posting this here so someone googling for the type definitions can find them on the above gist.

    opened by slig 0
  • Documentation for 1.4.x jQuery.easing.method() is needed

    Documentation for 1.4.x jQuery.easing.method() is needed

    The documentation for the plugin at the official site http://gsgd.co.uk/sandbox/jquery/easing/ needs to be updated to explain and guide other developers around the breaking of the Bonus feature where easing 1.3.x is based on jQuery 1.x and 2.x and easing 1.4.x is based on jQuery 3.x.

    It would be nice to also have this documentation in the README.md for https://github.com/gdsmith/jquery.easing

    jQuery.easing.method()'s old signature no longer works the same in 1.4.x:

    jQuery.easing.method(
    	null†,
    	current_time,
    	start_value,
    	end_value,
    	total_time)
    

    Wherever it is used directly in custom animations, the formula needs to be tweaked into this form:

    // - x is (current_time / total_time), aka "percentage completed"
    // - d is (end_value - start_value), aka "distance"
    // - s is (start_value), if not zero
    jQuery.easing.method(x) * d + s
    

    One example of using jQuery.easing.method() directly is when creating window.scrollBy() smooth scroll animations. jQuery handles CSS animations easily, but doesn't quite fit for controlling window scrolling position, as far as I know.

    Documentation Todo (stop being lazy) 
    opened by starlocke 14
Releases(1.4.2)
Color palette generation function using hue cycling and simple easing functions.

Rampensau ?? Color palette generation function using hue cycling and easing functions. Check out a simple demo or see it in action over on farbvelo 10

David Aerne 24 Dec 28, 2022
JQuery charCounter - jQuery Character Counter Plugin

jQuery Character Counter A jQuery based character counter for <input> and <textarea> HTML tags. What is this? This simple plugin allows you to add a c

mmmm_lemon 1 Aug 10, 2022
jQuery quick notification plugin. jQuery плагин быстрых уведомлений

Note: English translation by Google Translate Notific About Description: this is a jQuery plugin that helps you display notifications on your site. Li

Webarion 2 Nov 7, 2021
A variety of jQuery plugin patterns for jump starting your plugin development

jQuery Plugin Patterns So, you've tried out jQuery Boilerplate or written a few of your own plugins before. They work to a degree and are readable, bu

jQuery Boilerplate 1.6k Dec 31, 2022
This is a simple Image popup Jquery plugin. With a very simple configuration, you can show a popup on your webpage. By the way, this plugin works after page load.

Jquery-SingleImagePopup This is a simple Image popup Jquery plugin. With a very simple configuration, you can show a popup on your webpage. By the way

Rajan Karmaker 1 Aug 22, 2022
Jquery-actualizer - jQuery ajax actualizer

jQuery AJAX Actualizer Include jQuery & this plugin into your HTML file and use this js code: $('#target').actualizer('a'); On click at any A element,

Šimon (Simon) Rataj 1 Jul 28, 2020
jquery-input-mask-phone-number.js - A simple, easy jquery format phone number mask library

jquery-input-mask-phone-number A jQuery Plugin to make masks on input field to US phone format. Quick start 1. Add latest jQuery and jquery-input-mask

Raja Rama Mohan Thavalam 12 Aug 25, 2022
jQuery Star Rating Plugin

#jQuery Star Rating ##Overview The Star Rating Plugin is a plugin for the jQuery Javascript library that creates a non-obstrusive star rating control

Fyneworks 26 Nov 28, 2022
jQuery plugin to encourage strong user passwords

Naked Password¶ ↑ Simple jQuery plugin to improve security on passwords. Usage¶ ↑ Naked password is extremely easy to use. All thats needed is for you

Platform45 307 Nov 3, 2022
A jQuery plugin for doing client-side translations in javascript.

About jQuery-i18n is a jQuery plugin for doing client-side translations in javascript. It is based heavily on javascript i18n that almost doesn't suck

Dave Perrett 202 May 19, 2021
jQuery Split Pane plugin

split-pane jQuery Split Pane plugin The plugin should work in IE8 and above as well as in Chrome, Safari and Firefox. You can download split-pane.js a

Simon Hagström 162 Dec 13, 2022
A jQuery plugin for creating exceptional footnotes.

bigfoot.js by Chris Sauve Bigfoot is a jQuery plugin that creates exceptional footnotes. Simply include the code on your pages and footnotes will be d

Chris Sauve 929 Nov 21, 2022
jQuery tabs plugin

English description | Описание на русском jQuery tabs plugin. Easy and well done tabs with many options and skin support Version: 1.0.2 Project page a

Denis Ineshin 83 Nov 27, 2022
Responsive Tabs is a jQuery plugin that provides responsive tab functionality.

Responsive Tabs is a jQuery plugin that provides responsive tab functionality. The tabs transform to an accordion when it reaches a CSS breakpoint. You can use this plugin as a solution for displaying tabs elegantly on desktop, tablet and mobile.

Jelle Kralt 537 Dec 8, 2022
Easy responsive tabs - is a lightweight jQuery plugin which optimizes normal horizontal or vertical tabs to accordion on multi devices

Easy responsive tabs - is a lightweight jQuery plugin which optimizes normal horizontal or vertical tabs to accordion on multi devices like: web, tablets, Mobile (IPad & IPhone). This plugin adapts the screen size and changes its action accordingly.

Samson Onna 600 Dec 8, 2022
jQuery plugin for color manipulation and animation support.

jQuery Color Supported jQuery versions: 1.8+ Browser Support jQuery Color 3.x supports the following browsers: Desktop: Chrome: (Current - 1) and Curr

jQuery 1.6k Dec 5, 2022
The jQuery Plugin for Big Background Video (and Images)

BigVideo.js ####The jQuery Plugin for Big Background Video (and Images) Learn how to use this plugin on its demo page. 12-30-2015 Update This project

John Polacek 2.3k Jan 9, 2023
jQuery tags input plugin based on Twitter Bootstrap.

Bootstrap Tags Input Bootstrap Tags Input is a jQuery plugin providing a Twitter Bootstrap user interface for managing tags. Current stable version: v

null 26 Dec 21, 2022
A jQuery plugin to make your form controls look how you want them to. Now with HTML-5 attributes!

(jQuery) Uniform A jQuery plugin to make your form controls look how you want them to. Now with HTML-5 attributes! Works well with jQuery 1.6+, but we

Audith Softworks 2.2k Jan 2, 2023