Konqueror...
I've been messing around trying to get jquery to support konqueror. Don't know if you all have discussed this, but one hack that seems to work well is to treat it as part of safari. The following is the hack that I've had success with, since konqueror is most like safari and shares code with same. In particular this fixes problems in jquery.history.js which is one place where konqueror and safari are identical in their quirks. Tested on both konqueror 3.5.9 and 4.0.5, and works well in both. With
.is() and complex expressions
Hi jQuery people, For event delegation it would be handy if .is() (or something else) could match against a 'complex selector'. For example: $('body').click(function(e) { var clicked = $(e.target); if (clicked.is('ul.tabs-navigation a')) { // Do X; } else if (clicked.is('#something .foo .bar a')) { // Do Y; } else if (clicked.is('#sidebar h3')) { // Do Z; }; }); Dan Webb wrote something about Event Delegation made easy (http:// www.danwebb.net/2008/2/8/event-delegation-made-easy-in-jquery), but this
Performance issues inserting/replacing/removing large amounts of data
I've been trying to optimize a page that inserts, replaces and removes large amounts of data (> 2000 elements). The data is retrieved via Ajax and inserted into a div using elem.html(data); Each inserted element requires a click event to be bound. I had been using LiveQuery to handle the "automatic" event binding, but I found that by removing it (and manually handling binding/ unbinding) I was able to improve the speed of the initial insertion of data. However, there was still a big lag when removing
How can I pass a Java Script object to JQuery getJson callback function along with the data?
I am calling getJson from a method of an object. When the JSON data return, it would be very convenient for the call back function to be able to find the object from which the getJson call was issued because there is a great deal of context information stored in the object. FOR NOW, I set a global variable to point to the object before issuing the getJson call. That is not a satisfactory solution because the user may push other UI buttons which would issue other calls and overwrite the global object
Control the execution of successive ajax calls !!!
hello, I have a request to make two ajax calls (two different requests), but the call back function for both the ajx calls is same.My requirement here is, i do not want to trigger the second ajax call till the first ajax call and it's success function are completely executed. I short, i want to control the execution of the successive ajax calls. Any ideas or pointers for the above question? Thanks, nit...
Help Loading XML in JQuery Core object: Discrepancies between FF 3.0 and IE 7.0
I'm new to JQuery but am trying to use it in perhaps an advanced way: to process XML returned from a SharePoint Web service. It works for FF 3.0 but not IE 7.0. The discrepancy is that when I create a JQuery object from the xmlhttp response text (the XML returned by the service), and then view the innerHTML property of the JQuery object, it looks fine in FF, but it is an empty string in IE. Here's what I'm doing after I get the response from the service: this.jXml = $(this.xmlhttp.responseText);
Trac Report - 8/18
I've started reading through some of the old tickets. Today's update is mostly a list of things that can be closed. Ticket 1414 is the interesting one that may merit more discussion before closing. http://dev.jquery.com/ticket/925 - Attached new test case. Explanation of problem's symptoms. Needs: Patch. Very possible that this could become a wontfix item in the future. http://dev.jquery.com/ticket/1072 - Invalid. IE automatically creates a tbody element, and they're adding another one. http://dev.jquery.com/ticket/1191
jquery validation
i need form validation using jquery Leave a Reply Name: E-Mail Address: Phone Number: Enter a phone number : Address: City: Province/ State: Postal Code: Background How did you hear about Barefoot Journeys? What inspired you to take this course? Have you done any courses or workshops like this one before? What do you hope to receive from it? What is your greatest challenge? Do you have any concerns, or questions about this course or workshop? Method of Payment Account type this three are in radio
Invalid argument only with IE and only in a particular situation.
Hello, I'm new here and a beginner with jquery, so if this is the wrong place, please address me to the right one. The situation: I wrote a bit of js over jquery to update a div (cart content of an e-commerce site) with both a post call and a get call. Here it is: jQuery.noConflict(); jQuery(document).ready(function(){ jQuery("form[name='form_name_1'], form[name='form_name_2']").submit(function() { var inputs = []; var q_added = ''; jQuery(':input', this).each(function() { if(this.name != '') inputs.push(this.name
Making jQuery downloads available by SVN
Hello I'm developing JavaScript modules that rely on jQuery, and I'm doing this in SVN. So, of course, my development environment has to include a copy of jquery.js. I'd like to be able to use svn:externals to be able to pick up a copy of the jQuery download. The alternative, which is rather yucky, is to make a download myself and commit it to my SVN repository. What I'd like to be able to do is something like $ svn propget svn:externals mathtran-javascript jquery -r1234 http://jqueryjs.googlecode.com/svn/trunk/build
Descendant Testing
(Split from the discussion at http://groups.google.com/group/jquery-dev/browse_thread/thread/5e9d78af4ea552ed) Stripped down to the basics, what we're discussing here is simply a new type of filter identifying descendancy that can be applied directly to any jQuery object and its contained set. I'm defining this so strictly because in our previous discussion I felt like we were hitting all over the map. So, with that in mind, all this needs to do is apply a .filter() with a fancy helper function.
Trac Report
Hello all: If you can't tell, I've got an incredible amount of free time. That bodes well for jQuery, and poorly for your inboxes. This is your digest email for Trac stuff from today worth reviewing. I did this because I don't know what view a more privileged person than I am has that would show these changes. Responses to items probably fit best in Trac so we can easily relate the discussion to the topic. http://dev.jquery.com/ticket/2747: Changing the approach we have for .attr('href') could gain
New Extension, Possible $() changes?
I'm working on a rather small extension to jQuery that has some major implications. The goal of the extension is to be able to serialize just a subsection of a form. I plan to accomplish this by imitating the ".elements" property of a form object for any arbitrary DOM element that descends from a form element. There are two changes that would be in the area that is the core. 1. In jQuery.fn.serializeArray() rather than querying the node name, query the existence of the .elements property - return
Introduction, Contribution
Hi. My name is Nathan Hammond. I'm new here. I also plan to stick around. But so that I'm not just taking up space, I figured I should come up with something to do. So, that thing is to one by one go through all outstanding tickets in Trac and see them through to a resolution. Reporter didn't provide a test case? I'll try and create one. Browser-related problem? If it isn't a Mac browser, I'll put the browser through its paces. If it is to be resolved by a change to jQuery, I'll provide a patch.
MSIE version
1.http://jamazon.co.uk/web/2008/07/23/an-ie7-bug-that-returns-msie-60- user-agent-string/ IE7 will return an error user agent when there's too many software add their name into user agent. 2. My browser return this user agent, seems jquery.browser.version=6.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) )
return xml with filter
Hello all, I'm very new to javascript and even newer to jquery. I am trying to return results from an xml file but just not sure how to do it. The number of results I need is already set, and I already have it in place to figure out where to start and where to end. I'll try to explain this as best as possible. In my xml file I have 9 total entries and the limit is 4. Say we are on entry 5 (index 4) and a 'next' button is clicked, what I would like to do is pull entry 6,7,8 (index 5, 6, 7) into an
Safari mis-reporting the default selected property of a hidden option
Line 1061 of jquery-1.2.6.js causes an error on Windows version of Safari 3.1.2 (525.21). Safari claims that "value is null". Quick fix: change the if statement on 1060 to be: if ( name == "selected" && jQuery.browser.safari && elem.parentNode && elem.parentNode.selectedIndex) instead of if ( name == "selected" && jQuery.browser.safari)
the isDigit function in jquery.tablesorter (2.0.3) does not work for 0 or 0.0
Hi, I'm using jquery.tablesorter (ver 2.0.3) and I'm seeing that the numeric parser in the parsers failing to detect 0, 0.0, [1-9]*.0 and 00.0[1-9]* as numeric. Surely 0.0 should be considered numeric as 0? This is the code in tablesorter to check if it is numeric: this.isDigit = function(s,config) { var DECIMAL = '\\' + config.decimal; var exp = '/(^[+]?0(' + DECIMAL +'0+)?$)|(^([-+]?[1-9][0-9]*)$)| (^([-+]?((0?|[1-9][0-9]*)' + DECIMAL +'(0*[1-9][0-9]*)))$)|(^[-+]?
Access to restricted URI denied
Hi, I'm working on a AJAX widget for a postcards site (www.specialgreetings.com). We want to enable partners to display postcards on their website using this widget to display postcards from specialgreetings into their site. I am using jQuery for the AJAX calls. I have a affiliate.js on www.specialgreetings.com that handles all the calls. So the partner includes this js with their data and postcards are rendered on his website. I'm having trouble because it throws an exception: Error: uncaught exception:
small 'else-like' function: "instead" or "others"
I posted a small function I wrote to the main jQuery English group. Originally I called it "else" which works in Firefox, but as a reserved word breaks Safari, so "instead," "others," or "otherswise" would be a better term. http://groups.google.com/group/jquery-en/browse_thread/thread/6be2a127822a108d/5b515a940aaeb33f#5b515a940aaeb33f Essentially, it allows you to write else-like statements in your chain, immediately end()ing a previous destructive operation and filter()ing to everything else that
special events
I finally got around to publishing some plugins... http://plugins.jquery.com/project/drag http://plugins.jquery.com/project/drop http://plugins.jquery.com/project/hover http://plugins.jquery.com/project/wheel All four plugins leverage the, under-loved, special events api... I would love any feedback.
Information about jQuery.getScript
I wanted to ask why jQuery authors chooses an XMLHttpRequest for dynamic loading of files instead of DOM Manipiluation (append on head)? I know that DOM Manpiulation offer loading of cross domain scripts but what is the difference in those two methods? In meaning of performance and loading few files at the same time asynchronously? I'll be very grateful for Your answers, Martin
jQuery-1.2.6.js IE work-around (set attribute race condition)
With jQuery 1.2.6 I noticed that IE 6 at least has a race condition problem with setting certain attributes where I would intermittently get the error message of "Could not set the selected property. Unspecified error." on lines 15 and 23. (First seen with select boxes.) Per post: http://bytes.com/forum/thread150463.html, I made two modifications to the jQuery core file to successfully work around my particular issue: line #15: replaced "this.selected=(jQuery.inArray(this.value,values)>=0|| jQuery.inArray(this.text,values)>=0);"
patch for trying more XMLHTTP activeX objects
We've run into a client that has some weird setup who for whatever reason (thin clients/terminal server/non-admin users, etc) is having an error when they try to instantiate Microsoft.XMLHTTP in IE6, and yet MSXML2.XMLHttp.5.0 works. We don't know why, and at this point we've stopped caring. Basically our solution was simply to try a bit harder when ActiveX is available by trying additional versions of the XMLHTTP object. For people that don't have a problem the behavior should be the exact same
jQuery "ajax" function is kind of monolithic... difficult to adapt/improve
I've got a project I've released which is a drop-in replacement (100% API compatible with) of the browser's native XHR object. It implements full cross-browser functionality, but with the familiar API. The primary design reasoning for this was that I wanted my project to be able to be easily plugged-in/adapted to the major JS frameworks (jQuery, Dojo, Prototype, etc), since they all use XHR somewhere inside them. My problem has been that the other frameworks provide a small utility function which
jQuery Data Library Proposal
I have spoke to a number of community members including a few leaders. We are chatting about creating a seperate plugin for data processing client side. This library could be part of UI or not. (My thought is not would be better because that would allow other non-UI libraries to use the data services without developing a UI dependence.) I would also like to see an additional plugin (which we will build either way) that allows the dom to be tied to the data in the fashion of SPRY. Let the thoughts
$.ajax(dataType: jsonp) doesn't call beforeSend
Hi, It seems that $.ajax(dataType: jsonp) doesn't call beforeSend callback. Is it a feature or a bug? Thanks in advance, reedom
jQuery.ajax() cross-domain JSONP via POST
Hi there, I probably should have originally addressed this to the dev list: [ http://groups.google.com/group/jquery-en/browse_thread/thread/8bd0e249e2041b3b ]; but if we can churn away on this here, I'll update that post as necessary. I've spotted what may be a bug in the jQuery.ajax() code, but I wanted to touch base here to verify that I am not missing something. I am attempting to POST some JSON data across domains via jQuery's low- level .ajax() call; since it is cross-domain, I use the JSONP
AltKey returns alway undefined on 1.2.6
Hi All, Sorry if i'm wrong and if i'm missing something. It's seems that e.altKey alway returns undefined since jQuery 1.2.6 and not on the earlier versions. I have reproduced the bug below : - 1.2.6 bug http://jaysalvat.com/altKey/1.2.6.html - 1.2.3 ok http://jaysalvat.com/altKey/1.2.3.html Press Altkey+a for example. Regards. Jay
$.ajax and the options url and type
Took me quite a while before I realised why this does not work as I intended: $.ajax({ url: 'script.php?op=something', data: {data : 'something'}, type: 'POST', dataType: 'text', timeout: 10000, error: function(XMLHttpRequest, textStatus, errorThrown) { alert(textStatus); }, success: function(data, textStatus) { alert(textStatus); } }); The intention was that script.php would fork into different actions depending on $_GET['op']. But what I found
add overrideMimeType to jQuery.ajax options
I need to be able to call overrideMimeType on the XHR object when using jQuery.ajax( options ). Can this option be added? Christoph
Patch for IE bugs in ui.dialog and ui.slider
What do people think of these patches to fix exceptions being thrown in IE6 and 7 when using dialogs and sliders and one of the attributes ends up being NaN? Another issue addressed is displaying ui.dialog with width and height set to 'none' (IE6 and IE7) and the margin set to 'auto' (IE7), and also making sure the layout is correctly rendered in IE6 & 7. I think it would be nice to have these or similar patches in the newer versions of jquery.ui. Thanks, /Chandan Kudige diff -ruBb jpoker-reference/jquery/ui/ui.dialog.js
ajaxSend event, canceling a request
There doesn't seem to be a way to cancel a request using the global ajaxSend event, though it's possible with a beforeSend callback on each individual request, by returning false. It seems this would be useful to have for global validations of sorts. In my particular use case I want to check if the page is cached locally then skip the request step if it is, but keep all of the parameters of the request to continue as if it had been a real request. Currently, I switched the order of ajaxSend to right
Cross-Site XHR Plugin Registry
Hello, Can something like this be added to jQuery? http://www.sitepen.com/blog/2008/07/31/cross-site-xhr-plugin-registry/ I think it's a useful feature to have that will enable us to retrieve json content form other domains.
QUnit Love
We've started using QUnit pretty heavily at work and love it. We've made some changes/improvements to make it more XUnit-ish (most of which are based on a single, breaking change). The changes are listed below. I'd like to know if the jQuery community has any interest in these and if I should submit a patch or should I "fork"-off with them and make a separate jQuery plugin for 'em or something? Please advise. Below are the changes. Thanks in advance! Sincerely, Chad Myers These include: 1.) Fixed
Ticket discussion: #2851 filter and is should accept complex selectors
Hi devs, I'd like to gather some feedback on this ticket: http://dev.jquery.com/ticket/2851 Its obvious that something is broken when looking at a related ticket: http://dev.jquery.com/ticket/2266 Fixing the issue is currently blocked by a pending design issue: Should filter/is accept complex selectors? If not, is it acceptable to the issue reported in #2266 without full support for complex selectors on filter/is? If you've stumbled about a (related) issue, please share your experiences and expectations.
core file size and macros
I am wondering: what is the general philosophy for the jquery core regarding coding "macros" which take a little time to execute but reduce the file size of the library or a plugin. I have noticed macros used, for example, on the core height/width functions and the event bind/trigger shortcut functions (the usage there is a clear no-brainer as 20 functions are created in about 7 lines). But what is the cost/ benefit threshold of this practice (what should I do if I notice additional potential size
Respect content-type header in httpData()
Currently, if you make a $.ajax() request and you're not sure whether the response will be HTML or JSON the local onSuccess AJAX event (and other local AJAX events) don't have a clue of the type of data they have to manage. If the httpData() function (the one internally used by jQuery core to process the data in the response) respected the content-type header (i.e. parsing the response as a JSON object if content-type is "application/json") then the local AJAX events would know that the response
Selector bug
Hi all, my page was running slightly slow, and it turned out I made a little mistake, which resulted in the following selector: $elem.find("[for='']"); This actually resulted in finding ALL children of the my previously selected $elem. As far as I know, $('[for]') should select all elements actually _having_ a for attribute. Hence, my query above should select all elements having an empty for attribute (if possible), or otherwise all elements _having_ a for attribute at all, but surely NOT all elements.
getComputedStyle weirdness in Safari
Hey guys, as you might know, Safari supports getComputedStyle since version 3. However, recently, somebody informed me that our class morphing doesn't work in Safari (in jQuery UI), so I investigated. What I found out, is that the object returned by getComputedStyle doesn't /seem/ to be a actual object. Check this out: var foo = document.defaultView.getCurrentStyle(elem, null); alert(foo.color); //returns something like rgb(0,0,0) var bar = $.extend({}, document.defaultView.getCurrentStyle(elem,
Next Page