What happens with open tickets in closed milestones?
I'm wondering about this question for some time now - what will happen to all those still open tickets in already finished milestones? They look abandoned to me, they should be either closed if they are already fixed, or moved to 1.next or closest next milestone. For example this one: http://bugs.jquery.com/query?status=reopened&status=assigned&status=new&status=open&status=pending&group=status&milestone=1.4 Or even this one: http://bugs.jquery.com/query?status=reopened&status=assigned&status=new&status=open&status=pending&group=status&milestone=1.5.1
Suggestion: .nextWrap() and .prevWrap()
I don't speak english natively, but I'll try to explain it as clearly as I can: The functions would work like .next() and .prev(), but with a wrap when it reaches the last (or first) sibling: (function($){ $.fn.nextWrap = function() { var $next = this.next(); return ($next.length === 0) ? this.siblings().first() : $next; }; $.fn.prevWrap = function() { var $prev = this.prev(); return ($prev.length === 0) ? this.siblings().last() : $prev; }; })(jQuery);
.disable(event_types), .enable(event_types)
disables handlers for event type(s) and if no argument is passed it disables/enables the element
Should null be passed in query strings generated by jQuery.param?
Currently, jQuery.param({"foo":null})returns "foo=null"On the server, this gets treated as the string "null", even though a string was not passed in. I think that it would be a good idea to return this instead: "foo="which is at least closer to null. The patch would be to change s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );into s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value === null ? "" : value );
.detach memory leak.
I don't know if this is being fixed or is fixed in the most recent versions, but in 1.4.2, when I detached an element in DOM and then reinserted into another place, jQuery left something in memory...leaked. I found that I had to call the .detach and then on the next line also .remove the same element to avoid the leak. This became a big problem as I was scripting an animation for the screen with lots of detaching and appending. Saw the memory go from 80k to almost 1 gig. Not good. Is there even
should $(document).live() map to $(document).bind()? window, too?
right now $(document).live() seems to do nothing. it should maybe just map to .bind() instead. it's probably an issue with .live() requiring an explicit selector for filtering, but i think this is a fair exception. maybe both - "document" and "window", since they cannot be CSS-selected. minor, i know, but eh. edit: i remember there was some talk about making .ready() live as well. could be a related solution/discussion.
jquery 1.4.x, firefox 4 beta & ajax callbacks
Hi, I'm using firefox 4 beta 3, and I'm getting a strange behavior when using $.ajax : no callbacks are executed. I made a very small and simple test html page, just loading jquery in an empty html page. Than, using firebug's javascript console, I execute this : $.ajax({url:window.location.href, dataType:'text', success:function() {alert('success');}, error:function() {alert('error');}}); Then I get no alert, but I can see in Firebug's console that the request was successful. I tried this with jQuery
jquery-git.js vPull / build broken since Tue Mar 1 22:13:01 2011?
looks like the auto-build has been broken for some time : (
firing an event on addClass
Hello, I wonder if jQuery should add events to addClass and removeClass methods so we could add event handlers in our applications. I saw this discussion http://stackoverflow.com/questions/1950038/jquery-fire-event-if-css-class-changed where it is suggested to overwrite original addClass method, it seems this behaviour shoud be part of JQuery. Maybe change() method can be modified: $('selector').change('css', function(){ //do something }) Your thoughts?
jqXHR.abort breaks ajaxStart and ajaxStop
I am using jqXHR.abort() to cancel pending Ajax requests. However, using abort causes ajaxStart and ajaxStop to break, so I tried the following fix: f_abort = XMLHttpRequest.prototype.abort; XMLHttpRequest.prototype.abort = function() { $.proxy(f_abort, this)(); if ($.active === 1) { $.event.trigger("ajaxStop"); $.active = 0; } else if ($.active > 1) { $.active--; } }; Something that puzzles me is that I can not find where jQuery.active is given an
Firefox 4 RC loading?
There seem to be somewhat of a problem with loading jQuery in Firefox 4 RC. If you check my companies site: Jade Resor in FF4 RC you'll notice how the slideshow just show the black background. If one visit another page and go back jquery do load .. Since i can't debug the code with firebug i just can't figure out what's going wrong and why. It seems strange that it works sometimes and sometimes not. :f
parameter name of Deferred constructor can be more semantic
Currently the jQuery define Deferred as Deferred: function ( func ), I suggest it can be defined as Deferred: function ( initialize ) or Deferred: function ( initializeFn ) or Deferred: function ( initializer ) so that the semantics is more explicit, and code is more self-documented.
jQuery 1.5.1 event.js function: withinElement
i get a lot of errors (ok only one ;) in the above function, when i look at the code i see // Firefox sometimes assigns relatedTarget a XUL element // which we cannot access the parentNode property of try { when i am in development i want to stop on the try..catch...blocks, but only in my own scripts ;) i found no ticket for this, so now my question: open a ticket? because problem is known disable error tracking for try..catch is a must? is there an other way for me? :( insert an if (!parent)
JavaScript Hashmap Equivalent
It would be interesting to have HashMap capabilities in Jquery Core as it's a very common and usefull feature. I found a link with possibles implementation: http://stackoverflow.com/questions/368280/javascript-hashmap-equivalent What do you think about it?
The way Sizzle and QUnit are included
Hi, I'm a total newbie with Git and I try to get the conventions looking at interesting projects. I did this for jQuery and I just took a look at yepnope.js. And when I first saw jQuery's makefile ( https://github.com/jquery/jquery/blob/master/Makefile ), I found it awesome to be able to include other projects with the clone_or_pull method. But now, looking at yepnope, I found out git could handle this on its own with the submodule command creating a .gitmodules file ( https://github.com/SlexAxton/yepnope.js/blob/master/.gitmodules ).
add a readystate 2 and 3 to $.ajax
hello, i came accross a post on stackoverflow.com where someone was asking the exact same thing i was looking for. The conclusion was that you couldnt use $.ajax if you wanted to handle the readystate 2 so i made a patch for jQuery: http://stackoverflow.com/questions/3309185/jquery-ajax-overwrite-onreadystatechange-handler/5271480#5271480 the awnser form Paul Scheltema is it possible to include this in the core? i took a quick look at the latest stable (1.5.1) and i saw that you could do a similar
undelegate namespaced events
I noticed that undelegate doesn't seem to work with a custom namespaced event. If you undelegate('selector', '.namespace') it doesn't work, but if you unbind('.namespace') that same thing, it does. Here's a fiddle that explains what I expected http://jsfiddle.net/matthewlein/7LRmR/ seems like something useful for plugins or widgets that want to delegate.
IE9 responseXML
Hi people, Would you be so kind to take a look at this bug report I filed some time ago: http://bugs.jquery.com/ticket/8416 Unfortunately the ticket has been closed with an unsatisfying respose, in my opinion. Perhaps I'm overlooking something, that's why I need you guys (and girls) for a second, third... opinion. My objective: Locally, from within a .HTA, load a valid .xml file and retrieve the returned XML object through the responseXML method. I use the jQuery method: $.get() for loading the .xml
Addtions to attrHooks
For jQuery 1.6 there will be the ability to set custom 'get' and 'set' hooks for getting and setting custom attributes. I thought it would be a good idea to have a 'remove' hook in there as well. My idea behind this is mainly for backwards compatability. For modern browsers you would use the data-* attribute and for older browsers you might use $.data instead ( to overcome memory leaks as an example). You would need a 'remove' hook for checking which one was used and to take the right action. So
How can I use subclass property in jQuery.sub method ?
Hi. I read jQuery core.js(1.5) last month with my friends who love it. :-) We were not sure what is the code of "jQuerySubclass.subclass = this.subclass;" in the jQuery.sub method. How can I use it and what is the meaning of this substitution. I checked unit test of core.js, but I have no idea. If I don't set any value to jQuery.subclass, subclass property of the sub-class is undefined. var subClass = $.sub(); subClass.subclass; // => undefined subClass.subclass = "subClassName"; var subsubClass
.unbind return value
Hy Guys, (I'm new to this forum and likely to be inactive ;) anyway If you have not the binding of an event in your hands (jqtouch) but want to temporarily inactivate an event it would be certainly handy if unbind would return the set handler for the element. Or is there another solution to this? Kind regards v
better-er $.fn.animate() speeds proposal
animate() speeds such as "slow" and "fast" which translate to durations make no sense for varying computed animation distances. for example, animating "slow" will be lightning fast if you animate to a 2000px window width but will crawl within a 200px window width as demonstrated here: http://jsfiddle.net/8Wdcg/ the experience changes vastly for fluid containers and window widths since animate durations are fixated rather than the actual speeds (for the sake of setting a single tick timer i assume)
.serialize() event parameter
The serialize() function uses a concept called "successful controls" to determine while fields will be passed into the serialized string. One of the details of "successful controls" is that it doesn't include submit buttons, because: "No submit button value is serialized since the form was not submitted using a button" When I use serialize(), more often than not the form is submitted with a submit button. I typically use the recommended method, which gets triggered automatically when a submit button
Don't miss new standard javascript APIs
The new javascript (1.6) provides many useful features, specially in DOM manipulation, but I noticed that jQuery uses really few of them. For example, the feature element.classList could be used in add/remove/toggle/hasClass like this: // When in 'use strict' mode, the first argument of call function cannot be null or undefined // so make it an empty string if (Object.prototype.toString.call(document.documentElement.classList || '') === '[object DOMTokenList]') { var methods = { addClass:
jQuery.val and :checked
I find the behavior of the .val() method odd when combined with checkboxes and radiogroups. In my opinion, when calling $(":checkbox").val() I would expect it to return some indication of the value of those checkboxes, such as an array of checked values, but instead it just returns the value of the first checkbox in the group, disregarding whether or not that checkbox is even checked. The same holds true for radio groups, although they could simply just return the value of whichever radio button
jQuery Deferreds for server-side use
Hi all, A few days ago I made a bare-minimum fork of jQuery so that I could use $.Deferred in node js (basically the $.is_blank utilities, $.extend, and $.each). It's located here: https://github.com/kirbysayshi/jquery-jqd/blob/master/jquery-jqd.js (I had to rename my fork because I had a name conflict with Cloud9IDE). A super quick test for node is located here: https://github.com/kirbysayshi/jquery-jqd/blob/master/app.js. When I have some time later today, I'm going to try and use this with the
jQuery 1.5 (and 1.5.1rc) and event.isDefaultPrevented in Firefox
I'd like to draw attention to this post from the using jQuery forum as I've run into the same problem. It seems that in jQuery 1.5 (and 1.5.1rc) event.isDefaultPrevented is set to true in Firefox regardless of whether the event has had its default prevented: http://forum.jquery.com/topic/jquery1-5-isdefaultprevented-always-return-true-in-firefox-for-some-events Is this expected behaviour? If so is there a workaround?
[PATCH] on msie the browser detection feature should check also the documentMode to determine version
https://github.com/jquery/jquery/pull/240 Blog post with more info: http://theosp.me/patches/jquery-browser-detection-feature/
documentation of the "Effects" would benefit from 'continuation style' examples
(disclaimer: although I don't consider myself a dumb-ass, I may be completely off here, I studied the effects mechanism only briefly - don't be scared to correct me) Although the "Effects" documentation is quite extensive, the 'callback' arguments are barely mentioned. Since continuation style programming is becoming more popular (I'm not even coming from the web development world), I think it would be a good idea to mention on the general "Effects" documentation how effects are handled by a queue,
make append()-and-friends create elements like jQuery()
this $("body").append("<p/>", {id:"myP", class:"myClass"}); is better than $("body").append($("<p/>", {id:"myP", class:"myClass"})); seems a trivial and useful addition. thoughts? Leon
Possible Memory Leak in remove() and empty()
Hey all, I believe I have found a leak and have the beginnings of a solution to it. I'm writing an app that preforms ajax searching that returns pretty large result sets. I render them via jQuery into a tbody. once a subsequent search is performed I call tbody.empty() and append the new results. I created a test harness that would perform a predefined search 5000 times in a row with a good amount of time in between. I noticed that IE was allocating quite a bit of memory and never reclaiming it. At
ajax:beforeSend for jsonp requests don't fire
Hi all, I'm using jQuery to send jsonp request to flickr. My main issue is that I need to sign the url with all its params before sending the request. But at the moment I construct the url, I do not know the random callback function name. So i tempted to use the beforeSend event, which allow me to handle and modify the url with the second param. My idea is - just before sending the request - to modify on the fly the url in order to add the hashed signature with the right parameters. The problem is
:focus selector filter?
Since querySelectorAll has native support for :focus to find the focused element, does it make sense to add support for the older browsers? I can tell you that this is a common request on #jquery. $.expr[':'].focus = function(a){ return (a == document.activeElement); } This works in ie6+, ff3+, chrome2+, saf4+, opera9+, both with and without qSA. So the question is: is adding this worth the non-compatibility with FF2, Chrome1, and Safari 3? Something that can be resolved through proper documentation,
JQuery.get - Support "binary" type
Hello, For a WebGL application, I need to be able to parse a binary encoded file. The basic Ajax request response is a Unicode string with data loss (multiple byte combinations can produce the same non-valid unicode character). An option is available to the XMLHttpRequest component to allow this binary transfer. We just need to add this line: req.overrideMimeType('text/plain; charset=x-user-defined'); You can read more about this technique at the Mozilla Developer Center: https://developer.mozilla.org/En/Using_XMLHttpRequest#Receiving_binary_data
scriptloader/moduleloader for jQuery 1.5
Is a scriptloader planned for jQuery 1.5? I think a scriptloader in jQuery core or at least an official plugin would be quite usefull. I have written a scriptloader to start a new discussion about the required features. Here some features/options: everything is loaded async and simultaneous (performance) beside a simple callback-function you can also register "loaded"-events and if the eventhandler is bound after the script has loaded, the event handler is called immediatley global but simple FOUC
Building out .live() and .die()
In building a large Rails 3 / jQuery application, I've been running into some limitations of jQuery's .live() and .die() methods. For anyone who is unfamiliar, Rails 3 uses .live() extensively to enable all the AJAX functionality for an app. The Problem: $(document).ready( function() { $('a,form').live( 'click', function() { alert("You are going to a different page"); return true; }); }); // NEITHER of these will work $('a').die(); $('form').die(); // ONLY this will work $('a,form').die();
encodeURIComponent isn't sufficient for encoding application/x-www-form-urlencoded
Heya, I'm struggling with form serialization in jQuery 1.4.2, in a Rails 2.3.8 project. I'm ajax-posting a form containing a textarea, grabbing the form contents using $(form).serializeArray(). $.ajax uses $.param to serialize the contents, which in turn uses encodeURIComponent. If my textarea contains: foo "bar" baz then the resulting request body contains text=foo "bar" baz which Rack/Rails manages to deserialize as simply "text"=>"bar". * The spec - http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1
$(..).is() could work as $(..).length !== 0
What if $(..).is() would return whether the jQuery collection contains anything. if ($item.is()) { // $item.length !== 0 } What do you think? I think that makes more sense than the code below. if ($item.length !== 0) { // Yes, $item exists }
ability to set encoding for ajax sent data. working solution
hello friends, i'm in love with the jquery way to control the browser. everything may be done quite elegantly, but i wish to ask for yet another parameter to ajax, to cope to non unicode encodings on the server side: a widespread misfeature of all the browsers i know of is not respecting the page encoding when sending data through ajax (while they do respect it when submitting a form). i propose to allow the programmer to choose the encoding, and give my code as example. function unicode_escape is
Proposal for a globalization plugin: jQuery.glob.js
Hi Everyone, I am a developer from the Microsoft ASP.NET team. We’ve put together an open source prototype of a jQuery Globalization/Localization plugin, and would love your feedback. The complete prototype, extensive details of the API and its motivation, and demos are available on GitHub: jQuery.glob.js on GitHub And here is another post from Scott Guthrie introducing some of its features with some more examples: http://weblogs.asp.net/scottgu/archive/2010/06/10/jquery-globalization-plugin-from-microsoft.aspx
Next Page