jQuery.animation works differently across browsers
http://elv1s.ru/files/js/jQuery/webkit-weird-animation.html In Safari 5.0 (5533.16) and Chrome 6.0.453.1 both squares look weird. In IE 6-7 the left square looks weird. In Firefox and Opera it's fine. (I would record a screencast, but screenr.com stops working for me.)
JQuery 1.4.2 Problem with JQueryUI Tabs in IE 8
Hi, I have recently added tabs to my webpage and when i click a button in the tab i get the following error in IE 8: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322; OfficeLiveConnector.1.4; OfficeLivePatch.1.3) Timestamp: Tue, 8 Jun 2010 10:47:23 UTC Message: 'undefined' is null or not an object Line: 55 Char: 143 Code: 0 URI: jquery-1.4.2.min.js I am using JQuery 1.4.2
$.getJSON not working in IE8
Hi This is related to a bug ticket I opened. Probably shouldn't have opened it as a bug because I'm still not sure. http://dev.jquery.com/ticket/6750 I'm building a Facebook game that runs in an iFrame. When I use 1.4.2 it works on FF, Chrome and Opera but creates a problem with $.getJSON in IE (I have only tested on IE 8). The error it returns is "Object doesn't support this property or method" on the statement return new A.XMLHttpRequest The problem disappears if I switch to v1.3.2. I tried to
Charset latin1 error when use jQuery Load.
hi sirs, i'm from Brazil and i havent a good english! :( I have two pages using charset latin1, when i call this page normally using the browser...i havent error.. More if i call this pages using jquery load i have many charset errors. and if i use this php command utf8_encode(wrong string), its work fine, more i have maaaaany strings. Anyone can help me? jQuery uses utf8 deafult? thank all, excuse my english.
Impact and implications of broken .selector property
$('a1,a2').find('b1,b2').selector;
//RESULTS: "a1,a2 b1,b2"
//DESIRED: "a1 b1,a1 b2,a2 b1,a2 b2" I would have thought this problem would break .live(), but apparently it doesn't. (I haven't stepped through the implementation of .live() well enough to understand why not.) I have a patch available that fixes this behavior (test for comma in either selector; if either exists, split both on comma and combine) but the performance impact is non-negligible. a) Where is the .selector property used internally,
Increasing animation "frame interval" and exposing it
Hello everybody, I just took the time to dive into jQuery.fx code and I discovered that the interval we are using for animations is currently at 13ms which is equivalent to 77fps !if the browser can keep up to this pace! The problem is that animations involve heavy computation and numerous DOM access, and the browser is often forced to drop some frames. I've done some research to see how other libraries are dealing with this parameter: in YUI3, the interval is 20 by default (<=> 50fps max) and this
regular expression used in $.trim()
Hi Folks, $.trim() uses the following RegExp to trim: example link to jsbin because I can't insert backslashes ? As it turns out, this can be pretty ugly, Example: var mystr = ' some test -- more text new test xxx'; Executing the rtrim RegExp to this string hangs Firefox and Chrome, it just takes like forever. "mystr" contains whitespaces but mostly hex 160(A0) characters. This "problem" does only occur, if there is no prepending whitespace/A0,
patterns
in a lot of places there is the pattern: var aVar= (function(){ ... the body of the module }) (blah); What does the trailing (blah) do?
BUG :visible broken in IE8 on element following a display:inline
I have entered bug #5670 for this issue. Details are in the bug. High level: in IE8 a hidden div following a div with display:inline will be reported as visible IE reports the the height and width as greater than 0 for the hidden div when if follows an inline div This sucks --
jQuery version information
Currently we have : // The current version of jQuery being used jquery: "@VERSION", Which is reachable as an property of the jQuery instance (aka "object") $().jquery /* returns string: "1.4.2" */ I would like *not* to be obliged to make an jQuery instance just to be able to find out what the version is. It would be trivial to make this an property of the jQuery object , so that one can use it like this : jQuery.jquery // returns "1.4.2." Ideally I would like to see a structured version information,
Will / Can there be a jQuery.version instead of jQuery.fn.jquery
right now both jQuery.fn.jquery and $.fn.jquery can return the version number of jQuery, such as "1.4.2" would / could there be a function that is more simple, such as $.ver or jQuery.ver or jQuery.version?
Depreciating .live()
Hello dear jQuery community, I've been away from this forum for some time now and I'm not up to date with upcoming changes in the jQuery API, so this question might have already been answered. Since .delegate() has been around for some time now and since many members of this community and other bloggers have promoted it over .live() for performance, I am wondering if the presence of .live() still makes sense in the jQuery API. I'm aware that .delegate() currently uses .live() internally, but it seems
special.change throws error in IE while mousedown when used in live()
JQuery version: 1.4.2 If a page contains VML elements and if live("change") is registered, whenever the VML element is clicked, IE throws an error. The error is thrown in the line 1979 where type of the element is accessed. If the clicked element happens to be a VML element, IE throws the annoying error. Attached HTML has a test page. The error will be thrown when the Blue Oval is clicked. Regards, Sridhar
query by id - ignore context
When selecting elements jQuery provides an optional 2nd argument (context) which limits the search to a specific node. Adding this argument usually speeds up queries, but when the query is by id adding the context actually siginificantly slows down the query. As a test, go here: http://jquery.com/ and run this script in Firebug: console.time("1"); for(var i=0; i<2000; i++) { $("#jq-intro"); } console.timeEnd("1"); console.time("2"); for(var i=0; i<2000; i++) { $("#jq-content"); $("#jq-intro"); }
Transform BUG in $(html_String)
Look this: +function(){ var s = '<h1><em class="a_b c" style="min-height:50px;_height:50px;">x</em></h1>'; var d = $(s); alert(d.html()); }(); In Firefox, the result is: <em class="a_b c" style="min-height: 50px;">x</em> "_height:50px;" was lost (At here, we thought it is good, because FF don't know it) In IE, the result is: <EM class="a_b c" style="MIN-HEIGHT: 50px; HEIGHT: 50px">x</EM> "_height:50px;" transformed to "HEIGHT: 50px;" (It make a bad result that we can not use IE css hack inline)
Hidden dynamic content with ajax
Hello world i am planning to make a dynamic content effect on my web, with the following reference http://www.diftype.com/#Work i can make the thumb with dynamic loading effect but i can't call the entry into the "load content". i try to find there source get_entry.php which is empty... can any one help me for fix it?? thanks a lot Ho Chi-Lap
making jQuery.noConflict() callable anytime
hello, I use jQuery in an environnement where other js library than jquery are loaded, and the loading order of libraries may be difficult to control properly. I use a code like this in all my pages (this is autogenerated): jQuery.noConflict()(function ($) { ... }); I understand that jQuery.noConflict() should only be callled if jquery is loaded *after* the other library. I would like noConflict() to be callable anytime. what about this implementation: noConflict: function( deep ) { if
Is there a patch or fix for this bug: http://dev.jquery.com/ticket/6593
than one can use while 1.4.3 gets out?
unload method fails in IE
I have created a small page that gives info about the unload method and Microsoft's onbeforeunlaod property... it is located here: http://vidasp.net/jQuery-unload.html The support for unload() in Firefox, Chrome and Safari is almost 100%. Opera doesn't seem to like scripts being executed on unload at all... The main issue here is that unlaod() is badly supported in IE8. Only reloading the page and closing the browser window causes unload() to execute. The other reasons (which are far more important)
Is it possible to extract the normalized Event object and use it outside of jQuery?
This is a random question. I'm in a situation where my script can't depend on the full jQuery lib. But it would be nice to extract and use the normalized jquery.Event object. It prevents a lot of cross-browser compatibility boilerplate. Is this possible, advisable, allowed?
CSS Feature Detection: CSS3 Shadow
(can be integrated inside jquery core function 'jQuery.support') I'm working on a shadow feature detection. The idea is simple: if the browser have CSS3 shadow support, we will use it. Otherwise we will create a shadow box manually. It's working very well so far! But I can't detect this on Opera. Any ideas how to fix this? Any suggestion to improve this code? /** * CSS Feature Detection: Shadow * Tested on: Firefox 3.0.18 and 3.6, IE 6, 7, 8, Chrome 5, Opera 10.5, Safari 4.0.5 * On Opera we can't
IE8 live() broken when using "HTML5" drag and drop events (like dragend and drop)
When using bind() everything works as expected, but with live() it doesn't. This would be great to land in 1.4.3! Ticket: http://dev.jquery.com/ticket/6578 Test case: http://homepage.mac.com/matias/jquery/bug-live-drop-ie.html
jQuery load selector processing
Currently jQuery.fn.load(str,fn) uses a dummy div to load in contents and then returns the filtering by selector off the contents of that div. This is all fine and well, until you want to filter by head or body tags. I found this approach was able to accommodate such a filter and felt... I dunno more semantic: var iframe = $("<iframe src='javascript:true;' style='display:none;'></iframe>").appendTo("body"); iframe.contents()[0].write(data); // from the xhr response jQuery(this).html( iframe.contents().find(selector).html()
What is the status of jQuery’s multi-argument content syntax: deprecated, supported, documented?
Yes, it is from Stack Overflow: http://stackoverflow.com/questions/2932549/what-is-the-status-of-jquerys-multi-argument-content-syntax-deprecated-support I've never seen this in any jQuery docs I've read; nor, have I ever seen it in the wild. I just observed multi-content syntax working here for the after modifier with jQuery 1.4.2. Is this supported syntax? Is it deprecated? $(".section.warranty .warranty_checks :last").after( $('<div class="little check" />').click( function () { alert('hi')
jQuery.each and hasOwnProperty check
Why doesn't jQuery.each use the hasOwnProperty check within the "for in" loop for objects?
Add a JQuery Selector Escape Function?
(From JQuery Docs -> Selector) If you wish to use any of the meta-characters described above as a literal part of a name, you must escape the character with a backslash (\). Since Javascript uses the backslash for escape sequences in string literals, you must use two backslashes (\\) in string literals so that a single backslash will be put into the string 1. The full list of characters that need to be escaped: #;&,.+*~':"!^$[]()=>|/ I have a suggestion: How about adding a method to escape values
Table row fadeOut in IE7 doesn't work
Hi everyone, I want to use fadeOut effect for table row and it works great at FF3 and doesn't work at IE7. Can anybody help me? Example of my code below: <html> <body> <table id="table1" > <tr id="row1"> <td>hello</td> <td>world</td> </tr> <tr> <td id="td2">hellohello</td> <td>worldworld</td> </tr> </table> <script type="text/javascript" src="jquery-1.2.6.js"></script> <script type="text/javascript"> jQuery(document.getElementById("row1")).fadeOut("slow"); </script> </body> </html>
$().offset() returns erroneous results in Chrome. Works perfectly on FF and IE
Dear All, var offset = $(node).offset(); // node provides the dom element of an SVG element. I used to measure the absolute location of the node w.r.t the page top left corner. FF/IE works perfectly. But in chrome, I got (0,0). Is there a work around / fix for this? Demo: http://www.janapriya.net/vis/ Select Knobs tab. Knobs do not work in Chrome due to above issue. thanks and regards, Janapriya
Delegation with namespaced events error
$(document).delegate("body", "foo.bar", function(){ alert('bar') }).delegate("body", "foo.zar", function(){ alert('zar') }); $(document.body).trigger("foo.bar"); Alerts "zar" and "bar" when it should only alert "bar". This is a problem with liveHandler only checking handleObj.origType.replace( rnamespaces, "" ) === event.type Which will match anything foo VS something more like: handleObj.origType === event.type+(event.namespace ? "."+event.namespace : "") And in handle, you have to add
Ajax, sending JSON/data with boolean value
Hi, I'm not sure what kind of issue that is. I wonder if this is a bug or more a feature request? I have the following code: $.post(url, { thesaurus: false }, ...);So a POST-request is started, which is converted by jQuery into this (Firebug output): thesaurus=false which is on server-side (PHP f.e.) a string(5) "false"(string!) meaning (bool)TRUE. Wouldn't it be better to convert values like this automatically to a format which works (integer). My workaround is thesaurus: (false?1:0))(false is a
Bug with change delegation
There is a bug if you are delegating for click and change on the same element. If the click liveHandler runs before the change liveHandler, the change liveHandler event will never be fired. The FIX Line 2297 of the nightly build (the testChange function that tests if a change has happened) looks like: if ( data != null || val ) { e.type = "change"; return jQuery.event.trigger( e, arguments[1], elem ); } it should be changed to: if ( data != null || val ) { e.type = "change"; e.liveFired
How about being able to pass in a jquery object and/or dom node to closest()?
Back in 1.3, closest() was a great addition to jquery and I use it all the time. One thing that has surprised me is that you must pass a selector string; it will not accept a jquery object or dom node (unlike filter()). For example: var someDom = $('#foo .bar'); // some saved jquery object $('body').click(function(event) { $(event.target).closest(someDom); // always returns an empty jquery object $(event.target).closest(someDom.get(0)); // always returns an empty jquery object
index() always returns -1 on Firefox 3.7a5pre (minefield)
I'm trying to find the index of an li within a ul. Here is a gist with the code: http://gist.github.com/414601 Every one of those console.logs returns -1 in Firefox 3.7a5pre, and some index number in IE8, Chrome, and FF3.6. I realize this may not be a jQuery bug per say, but Firefox recently rewrote their HTML parser... and this might be a repercussion of that. Thanks, and if this is not a bug but rather I'm doing something wrong, please let me know! Thanks.
Feedback on patch for error callbacks when loading remote scripts
Howdy: So I took a stab at adding error callbacks for loading remote scripts -- the patch is available via github. I'm a JS noob, so I'd appreciate if someone could take a look at the patch and give me some feedback. There are two main things I'm worried about: 1) I think script.onerror is not a cross-browser compatible way to register the error callback -- can someone suggest what is the right way to handle this for IE? 2) I'm not really sure what parameters make sense to pass to jQuery.handleError()
Jquery and Protected Mode in IE8
Hello, I have the following code: function addToCart(a){ var uri = '?ajaxform=cart~~task=add~~id=' + a + '&UTI=' + getUTI(); $('#cart_details').fadeOut(); $.ajax({ type: "GET", url: uri, success: function(txt){ // Hide the Beta Logo if it's there //try{$('#beta_logo').fadeOut();}catch(e){} // Display the Cart Results for the User to see $('#cart_details').html(txt); $('#cart_details').fadeIn(); } }); } It simply sends the form to the cart.cfm and adds the
jQuery 1.4.2 constructor looses first text nodes
I ran into this with the jquery.tmpl plugin. The symptom can be easily reproduced with: jQuery('leading text <strong>followed by an element</strong>') will only have a length of 1 and will represent only the element 'strong'. This can be traced to about line 125 in jquery 1.4.2 uses match[1] to build the fragment not match[0]. Is this intentional or a bug? I can't see how using match[0] could cause issues. Thanks, Thatcher
Function to return nested values in an object
This obviously needs to be improved upon, but the idea is there: var obj = { "one" : { "two": { "three": 3 } } }; var arg = ["one", "two", "three"]; nestedValue = function(obj, arg) { var len = arg.length; if (len) { if (typeof arg == "string") { return obj[arg]; } else { while (arg.length) { var key = arg.shift(); if (!obj[key]) {
getting the href is broken in IE7
$('<a href="#test" />').attr('href') In FF, Chrome, Safari, IE8, this returns "#test" In IE7 it returns the full URL with "#test" tagged on. Is this expected/fixable? Or is it a bug?
jQuery.fn.append is unusually slow for large
This has come up while using the jquery.tmpl plugin. With 1.4.2, Webkit has unusable times which can be reduced to the following simple cases. In this case largeString is a joined array of <ul><li>brief text</li>(..3x li's)</ul> while $('#id') is an empty div. Case: $('#id').append(largeString) Safari/Chrome Array length:1600 Render time:127949 FF3.5 Array length:1600 Render time:2524 Case: $('#id').html(largeString) Safari/Chrome Array length:1600 Render time:551 FF3.5 Array length:1600 Render
QUnit should allow a delayed loading model so it can work with GWT
GWT loads the page in two parts which means you can't really use the onLoad event. QUnit depends on loading the framework when the page loads which makes it basically incompatible for use with GWT. It would be really nice if a load function was available so you could call it once GWT, or what ever other framework you are using, has loaded. Thanks, Zack
Next Page