A question about the impact may be caused by table's clientWidth/Height behavior change of Chromium
Hi, I'm a contributor of Chromium Project. I made a change of https://chromium-review.googlesource.com/c/chromium/src/+/1763510 which make table's clientWidth/Height match to its offsetWidth/Height. The corresponding issue page for that change is https://bugs.chromium.org/p/chromium/issues/detail?id=978019. In case of Firefox, its already has that behavior, and that is what we intend to introduce by the change above (In perspective of interoperability, it would be good I think). I got a positive
Option to prevent encoding by $.ajax and $.param?
This is essentially a proposal for an enhancement to the two named functions: I ran into an issue today when sending parameters with the ajax function. If the data option is set, $.param is used to encode and format the keys and values into a query string. But some of the values in my data were already encoded and hence got double encoded. It was not easy to determine which params had been pre-encoded and which hadn't. And there's no way to tell $.ajax not to encode the data because it's already
Future of jQuery Real Time Data
Will jQuery every make something for real time data effecting. Am not talking about Ajax request. As Ajax does some short stuff but we have to add time interval to refresh page. Which I think is making too many unnecessary requests to sever. To which we want the data should effect only when the server side is effected in same time in all device. I know there are alternatives but will jQuery bring this kind of change in future or not?
Error in JQuery core
Hello, I am new to JQuery and I downloaded a JQuery core file. When I loaded it into DreamWeaver it told me there is an error in the code. I am hoping you guys can quickly tell me how to fix it! DreamWeaver says that there is a syntax error on the line that says " .catch(function(error){ " Any Ideas? Thank you! jQuery.fn.ready = function( fn ) { readyList .then( fn ) // Wrap jQuery.readyException in a function so that the lookup // happens at the time of error handling instead of callback //
Why was the global flag disabled for cross domain script type $.ajax requests in older versions of jQuery
I'm using jQuery 1.12 and I noticed my global ajax event handlers (`ajaxSend`, `ajaxStart`, etc) weren't running for `$.ajax` requests with `dataType="script"` and `crossDomain=true`. After some investigation I found that in 1.12, jQuery always disabled the global flag on the request if it the dataType is script and it's cross domain! What was the reason for this behavior? Why was it originally added and why was it later removed? Relevant information: From what I can tell, the behavior was originally
.map() argument ordering should be switched
$.map(fooArray, callback) passes arguments into the callback with the correct ordering: (value, index) $(".foo").map(callback) passes arguments into the callback with the wrong ordering: (index, value) I believe the original reason why the second one passes index first is because it is expected that the developer will just use "this" to access the element. Now that es6 lamda style functionals are being used more and more, "this" is no longer an option. Code such as the code below doesn't work because
browserWidth() and height(), compatible for desktops and smartphones (fullscreen apps)
a gift back to the jQuery developers and community :) rename it and use it as you please. feel free to include this in the jQuery core; i think it's needed there. what's also needed is a color animation for rgba(0,0,0,0.5) to rgba(255,255,255,1) for instance. you forgot to include that :) moderators of this forum, - i'm not ungrateful - i'm an opensource developer who uses a forum like this to feed back vital info to the developers of jQuery - i'm not here to advertise my product, i simply want
JQuery 3.1.1 vs 2.2.4 change in behavior appending rows to a table
The following code: $('<TABLE />').append('<TR><TD>1</TD></TR>').appendTo('BODY'); results in slightly different DOM structures. Under 2.2.4 you get <TABLE><TBODY><TR>... Under 3.1.1 you get <TABLE><TR>... (one has a TBODY and one does not) This causes problems if you later have selectors like #id TBODY TR (to get all the body rows, and no header rows). I've reviewed the jQuery Core 3.0 Upgrade Guide and can't see anything that might be related. So my question is... is this expected behaviour or
Evolve jQuery to be a framework and not just a library
I know this is a long shot but it seems that jQuery has been left behind by frameworks (Angular, React, Vue). Though I know that jQuery is a library but do you guys have any plans to make it so that it's going to evolve and compete against those? I'm just throwing this out there
there maybe a memory leak about deferred in 3.x
When our project upgraded to jQuery3.2.1 (from 2.2.4), we found a memory leak about Deferred in jQuery3.x . the promise.then method does not release the handler & handler Closure . it work well in jQuery2.x and native Promise in chrome . look at the following case: http://plnkr.co/edit/DpMkLV2mqzwlX4Ruuk7i
Question about isPlainObject method
from the source code: "return typeof Ctor === "function" && toString.call( Ctor ) === ObjectFunctionString;" jQuery. isPlainObject ( {} ) // true jQuery. isPlainObject ( new Object ) // true but i don't understand this situation: /* function Ctor(){ } jQuery. isPlainObject (new Ctor); // true */ because toString.call( Ctor ) === ObjectFunctionString // this should is false.but result is true
Rename .closest()
I can't count the number of StackOverflow questions I've seen where they misused .closest(), thinking it would find the nearest sibling, cousin, etc. element that matches a selector. I think I've even seen it in places where .find() is what they want. This expectation matches the normal meaning of the function name, since closeness is not usually restricted to a particular direction. I suggest that it be renamed to something like .closestParent(), to make it clearer that it only searches through
Build and Deploy api.jquery.com project
Hi Team, I'am trying to deploy api.jquery.com code locally with the help of jquery-wp-content.But when I tried to apply the "grunt deploy" command the below error is thrown. $ grunt deploy Running "check-modules" task Running "xmllint:all" (xmllint) task >> Missing executable: xmllint. >> You must install libxml2. >> Downloads are available from http://www.xmlsoft.org/downloads.html Warning: Task "xmllint:all" failed. Use --force to continue. Aborted due to warnings. Can you please let
Please document .data/$.data caching
Neither the $.data nor the .data() documentation mention the cache system. I was retrieving objects using .data, and then setting a value in the object. Subsequent calls to .data didn't return the original object but the modified version. I had no idea there was a cache, it was very confusing. https://api.jquery.com/jquery.data/ https://api.jquery.com/data/
Jquery 1.x support in Jquery migrate 3.0.0 js
Hi Team, My web application is currently using below Jquery files. 1) jquery-2.1.4.min.js 2) jquery-migrate-1.2.1.js So now we are migrating to latest v 3.0.0 and instead of above files we are using 1) jquery-3.0.0.min.js 2) jquery-migrate-3.0.0.js So could you please tell me that if it will work fine after replacing jquery-migrate-1.2.1.js. Regards, Amit
document.ready and window.load firing order
Until version 2.2.4, $(document).ready fires before $(window).on("load", function), but with version 3.0.0 $(window).on("load", function) fires first! example: <script> $(document).ready(function(){ alert("ready fired"); }); $(window).on("load",function(){ alert("load fired"); }); </script> Is this a bug or a new feature?
Add optional data parameter to each function
I've come across situations where it would be nice to pass some data to the each function. As in $(myQuery).each(myFunction, myData) which would invoke myFunction(index, element, myData) for each element. A more specific example might be: $('#recordsTable tr').each(myHighlightFunction, arrayOfSelectedIds) where myHighlightFunction would examine each tr for some identifying aspect and change the background color for any row that matched a value in the array Right now, there are at least five ways
Click event is omitted once on Windows 10 Mobile
Hi, I am using jQuery 2.2.3 in a Windows 10 Mobile WebBrowser component. Alas it seems that click events get omitted once on Windows 10 Mobile so that only the second click (or touch in this case) is fired. The click event is registered like this: $('#id').on ( { 'click' : onClickDelegate } ); This works fine on Android and iOS and Windows Phone 8 / 8.1. Only on Windows 10 Mobile just the second touch fires the click
Add to jquery unserialise function
First, my English is poor We can get the corresponding URL via jquery params method,like that: var params= '{ "a": [ 0, [ 1, 2 ], [ 3, [ 4, 5 ], [ 6 ] ], { "b": [ 7, [ 8, 9 ], [ { "c": 10, "d": 11 } ], [ [ 12 ] ], [ [ [ 13 ] ] ], { "e": { "f": { "g": [ 14, [ 15 ] ] } } }, 16 ] }, 17 ] }' $.params(params) /*get params a[]=0&a[1][]=1&a[1][]=2&a[2][]=3&a[2][1][]=4&a[2][1][]=5&a[2][2][]=6&a[3][b][]=7&a[3][b][1][]=8&a[3][b][1][]=9&a[3][b][2][0][c]=10&a[3][b][2][0][d]=11&a[3][b][3][0][]=12&a[3][b][4][0][0][]=13&a[3][b][5][e][f][g][]=14&a[3][b][5][e][f][g][1][]=15&a[3][b][]=16&a[]=17
What can actually help in? (Jquery contribution)
Hi, I'm not quite sure if this is the right place to ask and if not then I apologize. But I was wanting to contribute somehow in the Jquery project somehow, so I checked out the contribution page on the site but it sort of left me lost. I have some experience in Jquery and JavaScript but i'm definitely not a whiz at it. I do have some extensive experience in CSS3 and HTML5. So I was wondering where would I be able to contribute (if at all), and if I can't contribute what should I do so that I can?
source bug???why cssHooks get method computed param always value is true?
please jquery core developer look this ! thank you very much! http://forum.jquery.com/topic/source-bug-why-csshooks-get-method-computed-param-always-value-is-true
how to bind a callback in capture manner?
in Javascript,we can bind a callback like this: ele.addEventListener("click",func,true); the last parameter true will make the event broadcast in a capture manner. but when using jquery,how to get the same result?
Get coordinate relative to other elements whith css transform involved
I'm thinking about a way to get coordinate of an element relative to another element when there is transform applied in between (either directly on those elements or somewhere on the dom tree). We can easily convert coordinate with the used of getComputedStyle().transform which return the matrix to apply. I have a running code doing it. We could do this way : All function would take the first element. - jQuery.toPageCoordinate() would return a function(x,y) to convert coordinate relative to element
text() setter method on textnode
Hello, I asked question on stackoverflow but still not sure what could be the reason for this method to not set textnode value. Code sample: $('div').contents().filter(function(){ return this.nodeType === 3; // text node }).text("no change!"); Wouldn't it be an improvement to handle it? What could be the downside/issue? Regards.
Lifetime of $._data
I'm currently working on a tool that examines accessibility issues pertaining to client websites and would like to add jQuery event handling as part of our automatic analysis. One of our rules accounts for having a tabIndex property associated with elements on the page that have an assigned click handler in order to ensure that the elements are also keyboard accessible. Given an HTMLElement, you can use the $._data method to access the event handlers that are associated with said element, which allows
JQuery v1.11.3 memory leak
Hi Guys, We're developing a website using asp.net and JQuery v.1.11.3. It has frameset and frames (althought it is unsupported in HTML5). Our target clients use IE8. We encountered memory leak in IE8 everytime a page is being rendered by the frame element. I have also read several articles which states that there are memory leaks when using frames in IE8. So how do I confirm it as a bug? Well first I tried our website on other browsers such as Chrome and Firefox and it seems that memory leak doesn't
Ajax-only build - without selector module (ideal as a lightweight ajax only build for mobile devices)
Right now, when doing a special jquery build, you must always include the selector module, no matter what the build is: "Any module may be excluded except for core , and selector . To exclude a module, pass its path relative to the src folder (without the .js extension)." There seems to be a common desire out there to only use the ajax part of the jquery library: http://stackoverflow.com/questions/4132163/is-there-only-ajax-part-of-jquery Right now, this is semi possible, if you build jquery
How about having method like getAllElementsInArea(x,y,width,height)
For method like getElementsAtPosition(x,y) which return us DOM elements of specific positions. Instead of a specific location can we have given area (may be a rectangle or circle radius from x,y). So it should look something like getAllElementsInArea(x,y,width,height) . To get elements from screen from a given area.
parent and parents DOM selector method names
Why do we use the parent method to select the immediate parent of a DOM object and parents to select its ancestors? This implies that there can be parallel html tags that act as a parent of a html tag. Which is not the case unless I am missing something. Why not use parent and ancestor instead?
Feature Request: Public Event Listener List
Hello, This is a very old topic, however, I would like to blow off the dust and start a fresh discussion on the matter. I will start with a story of a front end developer, lets call him Bob. One day Bob was wondering around in the magical jQuery Forrest when he had a nice little idea for a plugin. Bob wanted to create a simple/customizable way to ask a user for confirmation before the default events take place on an object. Here is a real world scenario. We have a "Delete Button" ... it has a click
Unexpected map method behavior
After working with filtering functions and going between libraries and native code, I found that jQuery is the only library that has unexpected behavior when mapping over an array. I also want to apologize if this has already been discussed, but I could not find the topic. The following is an example of the issue: // create a basic array of arrays var arr = [[1,2],[3,4],[5,6],["a","b"]]; >> [Array[2], Array[2], Array[2], Array[2]] // using native Array.prototype.map gives us the desired result arr.map(function(value,
Applying styles to :before and :after elements
This seems like something that should be fairly trivial: $('.foo:before').css('margin-top', '50px'); But currently does not work. There's no reason this coulnd't be implemented in this way: 1) Create a stylesheet on the page 2) Add a style for .foo:before and use the css rules provided
Allow * wildcard in .removeClass()
It would be nice to be able to use the * character as a wildcard in calls to .removeClass(). For example, elem.removeClass('foo-*') would remove all classes that start with foo-. Currently, the easiest way to do this seems to be the following, which is neither elegant nor efficient: .removeClass(function (_, cl) { return cl.split(' ').filter(function (c) { return c.substr(0, "foo-".length) === "foo-"; }).join(' '); })
How was code contributed before GitHub Pull-request was used?
Does anyone know how the code was contributed to the project before GitHub Pull-request was used? via patch on mailing list or issue tracker? Is that history archived? Thank you! Shin
What is the purpose of styles() method in jquery ?
i was just going through the source of jquery css() method and came across the following lines of code : function (name, value) { return access(this, function (elem, name, value) { var styles, len, map = {}, i = 0; if (jQuery.isArray(name)) { styles = getStyles(elem); len = name.length; for (; i < len; i++) { map[name[i]] = jQuery.css(elem, name[i], false, styles); } return map; }
iPhone 6 : jQuery(window).height() .width() dont work one bit.. fix included.
Was testing my seductiveapps.com software on iPhone 6 recently and found that my dialog resizing routines worked but not the background resizing which uses jQuery(window).width() and .height().. Well, it worked, but only after changing orientation on the damn thing once or twice.. This works from the start of the page's lifetime (not mine, found it a few years ago somewhere as browser-independent window width/height detection code) : var height = (window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight);
Why does _evalUrl() use async:false?
Why does _evalUrl() use async:false? Would it ever make sense for it to use async: true? Does it affect the user experience at all? My guess is that by doing it synchronously rather than async, you guarantee that javascript files are loaded and executed in order. Is that the reason? A common question when using jQuery is: Why am I seeing this warning: "Synchronous XMLHttpRequest on the main thread... jquery.js?body=1:9628"? The answer is that they are inserting a new <script> tag to the HTML via
Jquery value cache not updating as expected.
Hi. I've found the caching performed in the val() function troublesome in my last project. First of all, allow me to explain what I'm trying to do. I need to dynamically hide and show some options inside a select. The naive approach, trying to hide the option elements themselves, only worked in desktop browsers. For mobile browsers, this is not the case: they render all elements (even the hidden ones). The only way of hiding options dynamically in Android I've found is wrapping the options to be
jQuery css in parent iframe (firefox)
Hi well I am trying to do a $(someElement).css("display"); someElement was returned from parent window and was passed to iframe via a function. This call in firefox returns undefined due to the following code in jQuery: getStyles = function( elem ) { // Support: IE<=11+, Firefox<=30+ (#15098, #14150) // IE throws on elements created in popups // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" if ( elem.ownerDocument.defaultView.opener
jQuery event listener-Continuous or Live
I have my input elements and their change events to handle some display. After loading page, When input values are changed through some other jquery functions...I do not have a way to know the values are changed. Please note that I can not change or do anything with that other jquery function which changes my input values. It is not in my control. Can we have something in jQuery API which continuously keep checking or listening any changes happened to the html elements through external/internal uncontrollable
Next Page