1.2 bug in IE6 with png fix
Hi there's a bug in 1.2 when using png fixes on line 881. The problem is caused, because elem.filter does not match /opacity/ (parseFloat( elem.filter.match(/opacity=([^)]*)/) )[1]) / 100).toString() : ""; it can be fixed with => (parseFloat( (elem.filter.match(/opacity=([^)]*)/) ||[0,"100"])[1]) / 100).toString() : ""; weepy *...(
New event: elementReady
jQuery currently does not give the ability to run a function when a specific element is loaded into the DOM. Other libraries have this ability and it would be a useful addition. It's not in the 1.2 roadmap or in any plugin that I have found, so I was wondering if it has been considered. This feature would be similar to jQuery.ready() except that it would apply to a specific element instead of the whole document. I imagine the declaration would be something like jQuery.elementReady(id, fn) which would
jQuery and onload function
I've been searching all over and this is a last resort. I'm trying to use the fckeditor in the liferay portal (includes jQuery). My problem is the editor's onload functions seem to be overwritten in firefox by the jQuery(document).ready() functions. My biggest question is, Is this true? Secondly if it is, is there a way to use them simultaneously? Thanks for the help.
Planning on API browser
Hi folks, we don't have the export for wiki-to-xml yet, but nonetheless we need a different form of the API, one that is easier to browse. All solutions so far lack a few things here and there, and I'd like to gather ideas to provide one really useful api browser. Glen and I started a bit of brainstorming here: http://docs.jquery.com/APIBrowser Your feedback on that is highly welcome: What API browser are you using? What are you missing there? What features of the browser that you use most frequently
remove() bug in v1.2
Hi I have found a bug introduced in v1.2 with the below code. It clones the blue box when the mousedown event is triggered, displays the cloned box (now red), then removes the red box. In v1.2 the mousedown event on the blue box is cleared following the remove(). v1.1.4 works as expected $(document).ready(function(){ var a = $("<div id=d1 style='background-color:blue;width:100; height: 100;'></div>") .appendTo(document.body) .bind("mousedown", function(e) { var c = $(this).clone().empty() .appendTo($(this).parent())
Noexpando plugin
Hi, i wrote a small plugin that can disable and restore expandos. It can be used in cases where Internet Explorer has problems with expandos, for example if you attached data to nodes and .html() them (a small demo can be found at http://vmx.cx/tmp/jquery/noexpando/demo.htm). This isn't the only case, probably more important are the designMode issues (search the archive for more information). The only problem is that the plugin will only work with a patched jQuery. The patch is only 1 line long.
$('document).ready() issue on IE with 1.2
Hi everyone, since upgrading to 1.2, a strange quirk happens on IE ( 6 and 7 ). The document ready event doesn't seem to always work: on some reloads, without errors of sorts, it wont't fire. This looks to be triggered by an external banner script... I'm trying to build a clean test case right now. The bug looks "fixed" if I revert bindReady from the current: if ( this.readyState != "complete" ) return; to the old: if ( document.readyState != "complete" ) return; I can't find clues in the source,
Tests broken ?
Since jQuery 1.1.4, the tests are broken ! jQuery 1.2's tests are also broken ! When I try to run the tests on Firefox 2.0.0.6 / OSX, the tests stop running before they have time to finish. Firebug catches this error : jquery.js (line 2361) ret[i].getElementsByTagName is not a function [Break on this error] r = jQuery.merge( r, ret[i].getElementsByTagName( tag )); The last working version of the test is 1.1.3.1 Am I doing something wrong, or are jQuery 1.2's test broken ? Or is.... jQuery 1.2 broken
jquery and Struts 2
Hello, I'm a new with jquery, and after search the web about how to use the plugin Autocomplete with a Java implementation I can't figure out how to do it? Anyone know how to do it? BR Guerrinha
Was contains() removed in 1.2?
Hi, The function 'contains()' seems to have been removed for jQuery 1.2 but it's not listed as removed in the release docs: http://docs.jquery.com/Release:jQuery_1.2#Removed_Functionality $('h2').contains("Removed Functionality") // fails $('h2:contains(Removed Functionality)') // the new way? Congratulations on 1.2 by the way, great work, --Will
scrollTop animation bug?
<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hi everyone, <DIV><BR class="khtml-block-placeholder"></DIV><DIV>I'm playing around with the new v1.2 ability to use .animate() with scrollTop, but I've run into a strange situation. When I don't include a DOCTYPE on the page, it works as expected, but when I do include a DOCTYPE -- whether it's quirks or strict -- it fails silently.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR
Bug in serializeArray (jQuery v1.2)
I believe there is a bug in serializeArray whereby using... <select multiple="multiple" name="test[]"> <option value="one" selected="selected">One</option> <option value="two">Two</option> <option value="three" selected="selected">Three</option> </select> $('select').serialize(); returns 'test[]=0&test[]=1' instead of 'test[]=one&test[]=three'; I think the problem is line 2094(ish)... jQuery.map( val, function(i, val){ which should be... jQuery.map( val, function(val, i){ Ticket #1600 raised.
Zope3/JQuery Sprint
Hi all, sorry for cross posting but probably the user list was the wrong list for this posting. I'm a core developer of Zope3 and we organize a Zope3 Sprint in the Boston Area. One task whould be to integrate JQuery using JSON RPC. And intergrate JSON RPC support for JQuery which JQuery doesn't support right now. We also thinking about to build a Zope3 application server release which offers built in JQuery and JSON libraries ready to use for deveopers. You can see some early prototyping here: http://alpha.z3c.org
Tri-state Checkboxes
I'm wondering if there are any jQuery tri-state checkbox plugins? A tri-state checkbox has 3 states 0 unchecked 1 checked 2 greyed out (not disabled, not readonly) Some interpretations may view them as four states: 0 unchecked not greyed 1 checked not greyed 2 unchecked greyed 3 checked greyed I tried to write one and the basic issue that you "can not" change the background color (silver) to signify greyed out. Any tips? -- HLS
Ticket 1591 - IE $('table').attr('non-existent) "Invalid Argument" Error
<div><a href="http://dev.jquery.com/ticket/1591">http://dev.jquery.com/ticket/1591</a> IE throws an "Invalid Argument" error when attempting to get an attribute on a table element when the attribute doesn't exist. Fix below (and also in ticket) Around Line: 860 if ( jQuery.browser.msie && /href|src/.test(name) && !jQuery.isXMLDoc(elem) ) return elem.getAttribute( name, 2 ); </div> <div>FIX:</div> <div>// Fixes a getAttribute 'Invalid Exception' error when getting an attribute on a // table
Problem exploring a DOM loaded from a string.
I've been confronted with the following problem: - I have a ajax call returning a content. - A callback method receives the content. - I load the content using $(data). - When I look for a particular element using $("name",data), the script stops with the following error: ret[i].getElementsByTagName is not a function. I've checked everywhere, without fining any error. At the end I ran the following test: function test() { var test1="<html><head><title>A test</title></head><body> Hello there</body></html>";
1.2 broke tabs, breaks wiki
Looks like tabs depends on .eq(), which got removed in 1.2. This breaks all the new wiki API pages, eg. http://docs.jquery.com/Release:jQuery_1.2/Ajax <chrome://firebug/content/panel.html#> <chrome://firebug/content/panel.html#> $("li", nav).removeClass(settings.selectedClass).eq is not a function jquery.tabs.js (line 295) -- Jörn
Ajax XML response parsing raises error on empty response body in jQuery 1.1.4
The 1.1.4 release adds error checking when it parses an XML response to an Ajax request, by checking for a "parsererror" tag as the root tag of the parsed data (which is returned by the browser when the XML is malformed): if ( xml && data.documentElement.tagName == "parsererror" ) throw "parsererror"; Unfortunately, the browser considers a blank response body to be malformed XML, so when an application returns a blank body to indicate success (Rails, for example, uses this convention to indicate
Types wiki page
Hi folks, I've been working on a new wiki page explaining all types that are interesting for jQuery: http://docs.jquery.com/Types The primary purpose is to link to them from other API pages. But the page contains already much more information then just basic JavaScript types. I hope for your help on making this the reference to improve whenever questions about basic JavaScript issues come up on the mailing list. Folks like Michael Geary or Karl seem to keep repeating certain basics, and I'm sure
bind('load', ... ) not firing on IE in 1.1.4
Hi I am using bind.('load' ... ) to determine if an image has been loaded. It works fine in FF, and works at first in IE, but seems that IE caches the image and so the image load event does not get fired subsequently. You can see it in action here : http://parkerfox.parkerfox.railsplayground.net/labs/zoombox/ The relevant code is here: var img = $("<img/>") $(img).attr({ 'class': 'image', src: $elem.attr('href'), alt: $elem.text(), style: 'margin-top: -10000px; margin- top:-10000px'}).bind("load",
Firebug & $.ajax(), FireBug can't Display the full value of the XML.
Original XML [ <body xmlns="http://jabber.org/protocol/httpbind" hold="1" rid="931736" secure="true" wait="10" ver="1 .6"/> ] XML in FireBug [<body xmlns ] with Bold fonts Jquery Script $.ajax({ type: "POST", url: myUrl, processData: false, data: xmldoc, dataType: "xml", success: function(e) { alert(e); } }); I can see the full XML is alert(xmldoc) but then in fireBug just won't show out. It's working but I can't see the XML parsing around to the server. Is it any alternative way to use Firebug to
Appending Script Elements and domManip
Hi All, On my demo page for my del.icio.us plugin (http://jqueryjs.googlecode.com/svn/trunk/plugins/delicious/demo.html) I link directly to jquery-latest.pack.js at S3. When that file moved to 1.1.4 the demo broke. The problem was that I was using... $('head').append( objScript ); ... to grab the JSON feed from del.icio.us. The error is that the new version of $().domManip() uses $.ajax() to include scripts when a script element with a src attribute is detected. This is fine in most situations, but
Download Manager First draft - finally
Hi Folks, I felt this was probably a more appropriate forum for this, rather than cluttering up JQuery UI with it. Also, congratulations on getting 1.1.4 out. I'll be checking it out later. It's going to break my treetable, but I'm glad, .slice() seems so much more intuitive to me. I now have my ideas fleshed out in code. What I thought would be a nice weekend project turned out to be not such a trivial project after all. When you see the code, you'll wonder what the hell took so long, but this is
jQuery Offset in Core
Hi Everyone - I landed the Dimensions' .offset() method into core today, with a ton of help from Brandon. My primary justifications for doing so were: 1) To remove a common dependency for most plugins, including, most notably, jQuery UI. 2) To centralize the development of one of the most commonly used plugins. The file size hit is rather small (comparatively) - currently about +900b. Now, I integrated it into the build system and ran it against some jQuery UI demos, but then I hit a snag. A vast
Problems with insertAfter
Hi! After updateing my jQuery from 1.1.3 to Version 1.1.4 I#m getting this error: this.parentNode has no properties http://xxx/jquery.js Line 204 The part where I'm using the insertAfter-Command are this lines of code: function addWidget_success(_data) { var data = eval('('+ _data +')'); $('#'+ data.region) .append('<div id="widgetTempAdder"></div>') .find('#widgetTempAdder') .append(data.content); $('#'+ data.block_id) .hide() .insertAfter('#widgetTempAdder', function() { $('#'+ data.block_id) .corner()
jQuery improvement
Hey guys, I just had an idea that someone has probably already thought of but I think it greatly enhance the jQuery library. What if you could do this... $('#myDiv').css('height', +=10); Sort of retrieve and set the new value in one call. Maybe I'll write it when I get a minute. :) Maybe someone else who knows the lib better than me could write it more quickly. Anyway, just an idea
Trigger load event when complete ajax load
Hi! I think would be nice trigger a load event when an ajax load is complete. Am I wrong? Thank you! jQuery is great! load: function( url, params, callback, ifModified ) { if ( jQuery.isFunction( url ) ) return this.bind("load", url); callback = callback || function(){}; // Default to a GET request var type = "GET"; // If the second parameter was provided if ( params ) // If it's a function if ( jQuery.isFunction(
Form Serialization Question
Maybe I miss here with jQuery, but when it comes to forms, if you want to XHR the form elements, you need to serialize the elements of the form yourself. If so, when it comes to checkboxes, per HTML standard, it should not serialize unchecked fields. I see in jQuery.param, one change to it to skip unchecked check boxes with make it HTML compliant: // If an array was passed in, assume that it is an array // of form elements if ( a.constructor == Array || a.jquery ) // Serialize
Tests On Trunk Don't Complete in FF or IE
Should the tests on trunk complete? I've tried them in both FF and IE. FF gets to 12 IE to 79? The links off the jquery.com site seem to work ok. I wanted to review how JQuery tests itself to devise a plan for testing my own application. Does anyone have any advice on that matter (success using JSUnit etc)? Finally, just a comment ... I checked out version 1.1.4 thinking that maybe my testing issue was with trunk. The ant script seems to have a dependency on the plugin directory. Since it wasn't
Keyboard events
G'day all I have just completed a new menu based on JQuery and found the .hover function rather handy but alas there is no keyboard counterpart. Now I'm not 100% sure of the best implementation (it gets a little murky with focus and bubbling) of this or the interest it might garner but I'd like to contribute something. If this sounds like a good idea then I'd like to discuss some implentation details and if not then I won't waste any more bandwidth. Cheers Michael
document.ready in jQuery 1.1.4 - IE and FF inconsistent behavior
(Note: JR requested I post this here instead of the general support forum) Hi, A number of folks have independently come across this issue. What I would like to hear from John Resig or from other team members if the change was intentional? and why? In short, what I found is that $(document).ready() behaves differently in 1.1.4 for FF and IE. It appears to me that the 1.1.4 ready() method is bound to the true windows onload event in IE. In other words, $(document).ready() will not fire until body
Edge case Race Condition in IE with jQ 1.1.4
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="#ffffff" text="#000000"> Hi all, Sorry for polluting the dev list, but this is something happening in a pretty weird instance, and you guys would know better than anyone on any possible causes/solutions. We're running jQuery in an enterprise portal, and we're including CodePress (<a class="moz-txt-link-freetext" href="http://www.codepress.org">http://www.codepress.org</a>) in one of the pages. When
getElementsBySelector (slightly OT)
Firstly sorry since this isn't exactly jQuery-specific but rather something that I think would hugely boost the performance capabilities of all the javascript libraries. Reading John's blog about speed comparisons using Firefox 3's new native getElementsByClassName got me thinking. Bear with me and please do point out if I'm missing something obvious, since I don't really get why this hasn't been done already. The browser has to have a native implementation to select elements by a CSS selector, right?
Smooth effect on hover link
Hi all, I'm a newbie in JQuery and I'd like to do a script that would be exactly the same that this one on mootools (http://demos.mootools.net/ Fx.Styles). A simple margin-left on mouse hover and out. I'd like to use only JQuery for my website and not Mootools anymore. Can someone give me a little help to do an effect on a mouse hover/ out? I've tried with the tutorials, but without success. I will after be able to understand and continue developping my effects. Thanks in advance!
Event "Namespaces"
<div id="mb_0"> <div>What's the best way to unbind anonymous functions? For example to remove a function later on I'd have to:</div> <div> </div> <div>var foo = function() { ... };</div> <div> </div> <div>$(...).bind('event', foo);</div> <div>// More code</div> <div>$(...).unbind('event', foo);</div> <div> </div> <div>I see that there's a guid that jQuery assigns to the function passed in which it uses in the event.remove method. What are people's thoughts about assigning a "class" or namespace to
jQuery JSON AJAX Opera Safari IE but no FF problem
Hi everyone I've got a problem with this code: var SetAjaxEvents = function (){ $('form.ajax').each( function() { var action = $ (this).find('input[@name^="ajaxAction"]').val(); if( action != '' ){ $(this).ajaxForm({success:function(i){ eval(action+'('+i+')'); } }); }else{ $(this).ajaxForm(); } } ); } $.fn.LoadAjax = function(link){ this.load(link,function(){SetAjaxEvents();}); } I would like to get AJAX data and set for each form that will be loaded i want to bind some event, loading is ok but after
Is this a bug with ajax and insertafter
I was send from the IRC channel to the dev list for this one. Consider this snippet of code: $("#day a").toggle(function(){ $("<div>").after(this).load($(this).attr('href')); }, function () { do something } OR $("<div>").load($(this).attr('href')).insertAfter(this); OR var $div = $('<div>').insertAfter(this); $div.load(this.href); etc... How it works: you click on a link and after the link there comes a <div></div> with some small content. This works perfect in FireFox however in IE6 I get a runtime
$('<tag/>') in IE
In IE, $('<tag/>') syntax is problematic with elements that requires a closing tag. e.g. $('<span/>') always returns an empty set. I tested all elements listed here (<a href="http://www.w3.org/TR/html401/index/elements.html">http://www.w3.org/TR/html401/index/elements.html</a>), $('<tag/>') fails with A ABBR ACRONYM B BASEFONT BDO BIG BODY CENTER CITE CODE DEL DFN EM FONT FORM H1 H2 H3 H4 H5 H6 HEAD HTML I INS KBD LABEL MAP Q S SAMP SMALL SPAN STRIKE STRONG SUB SUP TITLE TT U VAR Of course, it doesn't
event handler signature
hello guys, simple example: $(document) .click(function(){alert('1');}) .click(function(){alert('2')}); will alert 1 and then 2 when you click on document $(document).unbind('click'); will delete all event handlers and maybe it is good but it would be awesome to add something like that: $(document) .unbind('click', 'my event handler') .click(function(){alert('1');},'my event handler'); idea is to provide users (and plugins?) with ability to bind/unbind their own handlers to common objects regards
Disable .attr("type","foo")
Following up on the other thread, discussing how setting the type attribute to a new value (.attr("type","foo")) causes an exception to occur in Internet Explorer. There are two possible solutions here: 1) Do a createElement("input"), set the new type value, and then attempt to make a perfect clone of the old input element. I have no idea how hard this would be, but it's definitely not trivial. 2) Simply disable .attr("type") and prevent users from using it (requiring them to explicitly create a
Next Page