robloach / jquery-once Goto Github PK
View Code? Open in Web Editor NEW:heavy_dollar_sign: Act on jQuery elements only once.
Home Page: http://npm.im/jquery-once
License: Other
:heavy_dollar_sign: Act on jQuery elements only once.
Home Page: http://npm.im/jquery-once
License: Other
Just let create the type definition in the package and point it in packages.json using
//packages.json
{...
types : jquery-once.d.ts
...}
Branch | Build failing 🚨 |
---|---|
Dependency |
[@types/jquery](https://github.com/DefinitelyTyped/DefinitelyTyped)
|
Current Version | 3.3.2 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
@types/jquery is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
3.4.9
to 3.4.10
.This version is covered by your current version range and after updating it in your project the build failed.
uglify-js is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 18 commits.
9707ccd
v3.4.10
cb8f3a2
add Node.js 10 to CI tests (#3342)
8b3259e
fix corner case in reduce_vars
(#3341)
b66f47b
update dependencies
8d2e6f3
fix function inlining after reduce_vars
(#3340)
b3ef5e5
enhance evaluate
(#3339)
627f5fb
fix corner case with nameCache
(#3338)
d90777b
parse mangle.properties.regex
in --config-file
properly (#3337)
e49297e
improve usability of pure_funcs
(#3336)
ebd82b3
fix corner case in collapse_vars
(#3334)
d074aa6
fix corner case in collapse_vars
(#3333)
b052f62
fix corner case in reduce_vars
(#3332)
d4ac84b
fix corner case in arguments
& reduce_vars
(#3331)
e250396
fix corner case in arguments
(#3330)
c6fa39b
Update README.md (#3311)
There are 18 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
0.23.0
to 0.24.0
.This version is covered by your current version range and after updating it in your project the build failed.
xo is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 13 commits.
a64ffc4
0.24.0
71ea1e3
Update dependencies
510d02e
CI updates (#360)
7017abe
Add no-useless-catch
rule
0b411fb
Add eslint-plugin-eslint-comments
ESLint plugin (#359)
3dd8f7e
Update readme
to match #305 (#357)
dd2c015
Drop support for Babel 6 in the import/no-unassigned-import
rule
61f9582
Support parsing ES2019
92f2870
Various code style improvements
9e75826
Add some new eslint-plugin-node
rules
c7054f3
Update dependencies
e656fd4
Mention the badgen.net XO badges in the readme
d1fd3e1
Move default ESLint cache to node_modules/.cache/xo. (#351)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Introduce a src
directory, that transpiles/compiles to jquery.once.js.
https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-modules-umd
Now that $.each is gone from the code, having once called without a parameter looks a lot less godd that it did: $(selector).once().each()
. More importantly jquery-once-X
is also extremely unhelpful when trying to debug code because there is no way to know where the once is added from in the code.
ID should be required for inspectability purposes and make debugging way easier.
Sorry if this is obvious, but I've tried Googling and I don't know what the parameter is or the significance of it. The README does not say.
For example:
$('div.calendar').once('calendar').each(function() {
// This function is only executed once for each div, even if this
// code segment is executed repeatedly.
});
What is 'calendar' here? It doesn't look like a selector. Is it just a name to assign, so I could call it anything? And what is it for? If I use once again on the same selector but with a different parameter will it consider it to be different?
☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.
Branch | Build failing 🚨 |
---|---|
Dependency | uglify-js |
Current Version | 3.3.12 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
uglify-js is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 15 commits.
951d87c
v3.3.13
798fc21
improve test/run-test.js
performance (#2971)
a75a046
compress arguments[index]
(#2967)
38f2b45
fix value reference caching in evaluate
(#2969)
56e2a36
enhance conditionals
(#2966)
0daa199
migrate safe transformations out of unsafe_comps
(#2962)
73e98dc
drop side_effects
-free return
values (#2965)
36bca69
enhance collapse_vars
(#2952)
ace5811
drop lone "use strict" in function body (#2963)
ba7bad0
show benchmark subtotal (#2960)
b8b2ac5
improve fix for #2954 (#2958)
ea23593
fix collapse_vars
on nested exception (#2955)
52de64c
deduplicate parenthesis around object and function literals (#2953)
4557902
minor clean-ups (#2951)
f40f5eb
improve mangle
(#2948)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Similar issue here: umdjs/umd#35
The committed fix was typeof exports === 'object' && typeof exports.nodeName !== 'string'
Use package.json
scripts instead, and the CLI tools available.
I am using bower to install jquery once.
It breaks on the last comma.
As @yched points out in 6c3c03d#commitcomment-9135909 , we need to update the inline code documentation to reflect any recent changes.
$(element).once(function() {
$(this).doSomething();
});
Then it is easy to use.
Perhaps in a fork, since "jquery" is in this project's name.
It appears that code like this:
jQuery(window).once('fixed-menu').load(function() {
// Do something
});
will never execute. I'm assuming you can't use once()
on window
?
Thanks!
Basically factoring
id = id || "once";
if (typeof id !== "string") {
throw new Error("jQuery.once() parameter must be a string");
}
// Build the name for the data identifier. Generate a new unique id if the
// id parameter is not provided.
var name = "jquery-once-" + id;
into it's own function and use in once, removeOnce and findOnce
Hi
It worked fine when elements are loaded on page load. But if i try to add an element which is added after page load it doesnt work.
Thanks
0.27.0
to 0.27.1
.This version is covered by your current version range and after updating it in your project the build failed.
xo is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
Important: We changed the cache structure, so you'll need to delete node_modules/.cache/xo
:
$ rm node_modules/.cache/xo
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Or at least it makes sense to add few lines about it as suggestion
https://github.com/Raynos/min-document
Might be good for testing rather tahn jsdom
To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:
.travis.yml
package.json
files, so that was left aloneIf you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.
Greenkeeper has checked the engines
key in any package.json
file, the .nvmrc
file, and the .travis.yml
file, if present.
engines
was only updated if it defined a single version, not a range..nvmrc
was updated to Node.js 10.travis.yml
was only changed if there was a root-level node_js
that didn’t already include Node.js 10, such as node
or lts/*
. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.For many simpler .travis.yml
configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Branch | Build failing 🚨 |
---|---|
Dependency | xo |
Current Version | 0.21.1 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
xo is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
fixture{-*,}.{js,jsx}
fixture{s,}/**
{test,tests,spec,__tests__}/fixture{s,}/**
**/bundle.js
nodeVersion
option set in an override
block. 98dee9a--space
option parsing. f76c901no-misleading-character-class
require-atomic-updates
no-async-promise-executor
ava/no-import-test-file
The new version differs by 10 commits.
be8c1d1
0.22.0
142744a
Bump dependencies
8e4f435
Remove **/bundle.js
as default ignore
f76c901
Fix CLI's --space
option parsing (#342)
98dee9a
Respect nodeVersion
option set in override
block (#345)
e783704
Update dependencies and fix unit tests (#344)
404d81b
Fix links in documentation (#343)
71d06a0
Upgrade to ESLint 5 (#333)
00d6b7c
Don't ignore fixture directories by default (#317)
957b0d9
Add support for TypeScript and document usage with Flow (#326)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
0.25.4
to 0.26.0
.This version is covered by your current version range and after updating it in your project the build failed.
xo is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
20 new rules 👌
default-param-last
function-call-argument-newline
grouped-accessor-pairs
no-constructor-return
no-dupe-else-if
no-import-assign
no-setter-return
no-useless-catch
prefer-exponentiation-operator
prefer-named-capture-group
prefer-object-spread
prefer-regex-literals
unicorn/prefer-modern-dom-apis
unicorn/prefer-negative-index
unicorn/prefer-replace-all
unicorn/prefer-string-slice
unicorn/prefer-trim-start-end
es2020
environment by default eb5ea2cThe new version differs by 10 commits ahead by 10, behind by 2.
c2bb1bf
0.26.0
eb5ea2c
Set the es2020
environment by default
08af7c1
Fix compatibility with being run in a child process (#405)
d7fa875
Require Node.js 10
ab3e01a
Temporarily disable the import/order
rule
c50eaf0
Add some overrides to unicorn/prevent-abbreviations
e8c43d2
Replace destructing import with one-by-one import (#417)
5cddaec
Replace singular Lodash packages with the main one (#413)
1fdc2f9
Fix Node.js range for prefer-object-spread
rule (#408)
6463dfe
Move xo --init
to npm init xo
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Branch | Build failing 🚨 |
---|---|
Dependency | uglify-js |
Current Version | 3.4.8 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
uglify-js is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 5 commits.
ea999b0
v3.4.9
ce7e220
fix corner case in conditionals
(#3244)
2bdaca1
enhance conditionals
(#3243)
aa00292
fix corner case in reduce_vars
(#3241)
f352bce
fix corner case in collapse_vars
(#3239)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Add code coverage through https://coveralls.io and https://www.npmjs.org/package/coveralls
Branch | Build failing 🚨 |
---|---|
Dependency | mocha |
Current Version | 5.0.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 15 commits.
09ce746
Release v5.0.1
70027b6
update changelog for v5.0.1 [ci skip]
44aae9f
add working wallaby config
412cf27
[Update] license year
b7377b3
rename help-wanted to "help wanted" in stale.yml
d975a6a
fix memory leak when run in v8; closes #3119
3509029
update .gitignore to only ignore root mocha.js [ci skip]
b57f623
fix: When using --delay, .only() no longer works. Issue #1838
cd74322
Slight copy update on docs for test directory
f687d2b
update docs for the glob
14fc030
Add all supported wallaby editors
2e7e4c0
rename "common-mistake" label to "faq"
bca57f4
clarify docs on html, xunit and 3p reporters; closes #1906
2fe2d01
Revert "fix travis "before script" script"
c0ac1b9
fix travis "before script" script
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Branch | Build failing 🚨 |
---|---|
Dependency | jsdom |
Current Version | 11.11.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
jsdom is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 22 commits.
4d26c67
Version 11.12.0
d6688e5
Implement Element.prototype.closest()
9191218
Upgrade NWSAPI to v2.0.7
500a209
Change storageQuota to operate on code units, not bytes
23d67eb
Add the storageQuota option
b4db242
Remove unused form-data-symbols.js file
70fd739
Fix a few entries in the changelog
eae1062
Upgrades cssstyle dependency to ^1.0.0
022c204
Update hosts in Travis configuration
2761d3c
HashChangeEvent and PopStateEvent should no longer bubble
f1270e7
Roll Web Platform Tests
d6f8a97
Enable Blob-slice.html test in Node.js v10
3afbc0f
Implement Web storage - localStorage, sessionStorage, StorageEvent
7b4db76
Handle Node.js v6 timeout in execution-timing tests
a5a7785
Run failing tests to confirm their status
There are 22 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
3.6.3
to 3.6.4
.This version is covered by your current version range and after updating it in your project the build failed.
uglify-js is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 11 commits.
370c8e0
v3.6.4
4240fba
fix corner cases in unused
(#3519)
267bc70
fix corner case in unused
(#3517)
a53ab99
fix corner case in side_effects
(#3514)
02308a7
fix corner case in reduce_vars
(#3510)
0b3705e
fix corner cases in inline
(#3507)
da5a21b
fix GitHub Actions script for fuzzing (#3504)
5bd0cf8
enable GitHub Actions (#3503)
9199ab5
minor tweaks (#3502)
ca6dce4
fix corner case in collapse_vars
(#3501)
543dd7d
fix corner case in comments
(#3500)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.