jQuery.fn.hover & Firefox's mouseout issues
Hello, I was wondering if a work-around for a well known Firefox Bug could be added to jQuery's withinElement function. 1 [The Bug] FF sometimes sets event's target properties to native, anonymous elements that are not part of the DOM. This causes Permission Denied exceptions when properties of these elements are queried. *) http://www.quirksmode.org/bugreports/archives/2005/11/extraneous_and_erronous_Mozilla_mouseover_and_mous.html *) https://bugzilla.mozilla.org/show_bug.cgi?id=101197 *) https://bugzilla.mozilla.org/show_bug.cgi?id=379095
jquery 1.2.3 not working in my application
I have just started learning jquery on the job. I am working on existing application which uses jquery 1.2.1. I wanted to use 1.2.3 for getting better performance. When I do the substitution and load my page, I get the following errors jQuery(document).ready is not a function jQuery(document).triggerHandler is not a function I am not sure why these are caused. And both these are very fundamental stuff. When I compared 1.2.1 and 1.2.3 versions, the 1.2.1's ready function does not have a call to triggerHandler
toggleClass boolean parameter proposition
Hi all, Would you accept a patch that would give the possibility to give a boolean parameter to toggleClass ? Eg: instead of : if (this.checked) { $(this).addClass("order_selected"); } else { $(this).removeClass("order_selected"); } we could do : $(this).toggleClass("order_selected", this.checked); The optional boolean parameter give the condition logic if either the class should be added or removed : true : addClass false : removeClass -- Fabien Meghazi Website: http://www.amigrave.com
mozilla DOM nodeValue length
HI! I just found, some interesting surprise... Surprise is in Gecko DOM DOM.nodeValue or DOM.data, in FireFox (~2.0.0.12) can hold ONLY 4K length string.!!! And if server XML response, that contains nodes, with string data longer than 4096 char, may be cut for 4096 :(((
[Optimization]Multiple variables declaration
While checking the source, I noticed that the code is not too optimized on variables declarations. Many var a; var b; var c; while var a,b,c; is much shorter. I opened a ticket where I point many points where variables are declared many times in the same scope, even with the same value each time! Also an unused variable, this one is a total waste. I think this is important, many parts of the source do really wicked things, just to save a byte or two. Then give this issue the same attention so we
Safari .hide() on new elements fixed(?) in Safari - need opinion
Hi there, I've been playing with creating new elements and fading them in on the page (e.g. http://jqueryfordesigners.com/demo/image-load-demo.php) - but there's a bug in jQuery & Safari that doesn't allow new elements, outside of the DOM to have their display style set. I know this is a low priority job in the bug tickets, but it's been bothering me - so I've hacked around jQuery and *think* I've found the fix. Can I get someone to validate it in IE (I don't have a PC) or even sanity check the change.
array.push() is slow
Came across this code in jQuery 1.2.3, when looking at performance in my javascript code. merge: function( first, second ) { // We have to loop this way because IE & Opera overwrite the length // expando of getElementsByTagName // Also, we need to make sure that the correct elements are being returned // (IE returns comment nodes in a '*' query) if ( jQuery.browser.msie ) { for ( var i = 0; second[ i ]; i++ ) if ( second[ i ].nodeType
custom error handler around browser event loop?
The development group seemed like the right place for this question; my apologies in advance if I should have used the broader group. My company is using jQuery to build a very cool web app. We love it. We're trying to do as much right as possible, including exception handling. I've got a custom error handler that I want all errors to go through so that we can do things like report them back to the server, add debug alerts, etc. Everything works great in IE(6/7), but I'm missing a set of errors in
Animated methods do not trigger callback when speed is 0...
I happen to be working on a plug-in where the FX used to show elements is configurable. I want the default behavior to just show an element with no delay, but I noticed that if you specify the FX with a 0 speed than the callback is never triggered. I'm sure this is only ever going to be encountered when writing plug-ins, but it definitely should trigger the callback. I just filled a bug for this: http://dev.jquery.com/ticket/2542 -Dan
table prepend rows -vs- header
I am adding, via prepend, rows into a table as needed from an array as the user navigates the page. The rows added to the top are the most relevant but ... The problem I'm running into is trying to keep the HEADER row in place and add the new rows after the HEADER row. Any Ideas? - KG Woltz
IE Bug Using Ajax Header Loads
Using the document head to load local script and jsonp files is not sending a "text/javascript" or "application/javascript" request Accept header for Internet Explorer 7. I tried adding script.type = "text/ javascript" and its still causing IE to send an Accept header of "*/ *". My application depends on the Accept Header for javascript because the url does not have an extension, this is how I determine what type of content to send back in the response. JavaScript, Xml, Html, etc? Any ideas?
Joomla JCEBOX not working properly under SAFARI 3.0.4
Hi All We've got this weird behavior in JOOMLA. If you are using SAFARI 3.0.4 (Win or MAC) the lightbox do not expand correctly, but if you change the size of the browser window, it display correctly. Please check at http://training/behindthenotes.com and on quicklinks at your right click either tell a friend or go to http://training.behindthenotes.com/Friends-of-BTN/Friends-of-BTN.html and click on "we are extremely grateful to you all " on the top text. I'm using the latest jquery (1.2.3 $Date:
Deliberate error or oversite or me?
Hi I have discovered, what for me is a bug. It has to do with the css call returning opacity. In firefox it returns the opacity fine IE: $(".mytransparentdiv").css("opacity") if i alert the above it will return .4 or .9 or whatever the opacity is. it will do this if the opacity has been set in the styles. however in IE it always alerts 1. So to jquery IE has opaque or transparent and nowhere inbetween. this is strange because if you set opacity thusly...$(".mytransparentdiv").css({opacity: ".5"})
IE7 displays diffenert from IE6
http://docs.jquery.com/Core/jQuery#expressioncontext when I open the above link in IE7.0.6.* OS is Windows Vista Home Premium I see Tabs are overlapped and the Example container divs are getting Borders like Textarea Anybosy has seen ansy issues as above, Please let me know Thanks Rajesh
svn access for new plugin submission?
Is there a chance someone of the dev team could grant me svn access in order to submit my plugin (http://plugins.jquery.com/project/ fxqueues)? I really don't know if this is the right place where I should ask this, but I couldn't find any wiki page telling what to do. I emailed John Resig a few weeks ago but he didn't replied, and couldn't find the other members' email addresses. Thanks in advance, Luciano.
odd issue in print-preview on firefox
I have a very strange issue. From tests and debugs I have done until now I concluded the problem for this particular browser lives in my $.each callback, as soon as is called: [...] this.render = function() { $(acorde_seletor).each(function() { [...] but if I do: [...] this.render = function() { return; $(acorde_seletor).each(function() { [...] I have at the given moment my html estructure viewable by print-preview. So what to do? HTML FILE: http://websaudavel.com/proj-acordes/svn-acordes
$(document).ready() - $.isReady bug
Hi, We have spent some time racking our heads why $(document).ready() wasn't always firing and we finally found it. The ready() function checks jQuery.isReady. If true, it fires straight away, if false, it gets queued and fired once the document is ready. This is fine if you have a page which registers a ready function on the initial load of the page. At this point jQuery hooks itself up to capture the documents ready event, fires your function and also sets jQuery.isReady to true. However, if you
applause for jquery.collections
<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I've been staring at it for about 5 days, knowing I needed to understand why my gut said it was so important. I think this plugin deserves a lot of attention. Standing ovation to Ariel on this one. It's really changing the way I approach my jQuery related code thats not necessarily attached to the dom. <div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0,
Need Help on Porting JQuery to be used in Desktop Gadgets.
Hey all, These days are days of small apps. I have checked JQuery works well with browser but stops (Especially Effects that I tried out). So I am planning to develop "a port" / addon for JQuery so that it can be used in Desktop Gadgets like Vista Sidebar Gadgets , Yahoo Widgets etc. Pls revert back with some directions , pointers , clue, insight. Your Response is greatly appreciated. :) Thanks Neps
jQuery.fx.update doesn't check for "inline-block"
Hey all, I was getting popping in my animations when applying to inline-block (or -moz-inline-box) spans due to them being changed to blocks. I fixed it by making the following changes jQuery.fx.prototype = { // Simple function for setting a style value update: function(){ if ( this.options.step ) this.options.step.apply( this.elem, [ this.now, this ] ); (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this ); // Set display property to block for
Check box status is not retaining when I sort the table ( I am using the Jquery tablesort)
Check box status is not retaining when I sort the table ( I am using the Jquery tablesort). I have a table with name , account number , select all/ Select none (This is check box). When I clicks the select all I am able to select all the check box , But when I sort on the name or account number I am not able to retain the status (i.e all the check boxes are un-selected). I have noticed this problem in IE only FireFox is working fine. Here the code I am using for selecting all the check boxes function
PQUERY
This post is not specifically about jQuery, but might be interesting brain food to its developers. As I said before, I'm working on pQuery, which is a jQuery port to Perl. I was showing pQuery to my good friend Gugod (he introduced me to jQuery in the first place). He said in passing "You should make pQuery be able to work against multiple documents. That's one thing jQuery doesn't do." At first I thought he was crazy. Then my brain hurt for a bit. Then I decided against it since i want pQuery to
Jquery MouseUp , right mouse up or left mouseup
how do i know it was a left mouseup or right mouseup
attr.src works with id but not with class
I am building a simple form to dynamically change image; the idea is that you write a number into input field, click OK and the new image is loaded. I wanted to put a dozen of similar forms on a page and use as little (x)HTML code as possible, so I decided to use a class, not ids. Alas, while I can manage to do what I wanted while calling the specific id, I can't do the same using $(this). Is this intended, am I doing anything wrong or is it a bug? Here's my HTML: <div> <img src="1.jpg" alt="" class="cover"
jQuery on CPAN
I just uploaded jQuery-1.2.3 to Perl's CPAN as JS-jQuery-1.2.3.001. http://search.cpan.org/dist/JS-jQuery/ I blogged about it here: http://blog.ingy.net/2008/03/comprehensive-programming-archive.html The CPAN distribution contains all the pertinent jQuery files: http://search.cpan.org/src/INGY/JS-jQuery-1.2.3.001/lib/JS/ You can now install jQuery on a machine with this: > sudo cpan JS-jQuery After installation you can find the installed files with this: > js-cpan jquery* To use jQuery in some HTML
Main Page Confusion
Hi all, I was just at the main page http://jquery.com/ and had some minor concerns. First is the footer: © 2007 John Resig and the jQuery Team. I'm pretty sure that could be updated. :) The 2nd is thing is: Download jQuery 1.2.3 (15kb, Minified and Gzipped) When I follow that link I am offered a: jquery-1.2.3.min.js 52.8 KB which is neither 15K nor gzipped. (Of course gzipping it does make it 15K and gzipped :) Is this intentional? Cheers, Ingy
Restricting access to jQuery
Hi I'm writing an application which is going to make use of user submitted Javascript. I want to resrict access to jQuery (for obvious reasons). Would the following achieve this ? (function(){ var jQuery = $ = null /* USER CODE HERE */ })() Thoughts ? Confused weepy
jquery dom element construction within frame causing divs to leak
jQuery Version: 1.2.3 Internet Explorer Version: 6 or 7 In the following example SIEVE will report two leaks for every time leak() is called only when the page is inside a frame. If this html is served itself as the main page it will not report a leak BUT if it's served inside the below frameset these two leaks are reported each time the leak() function is called: <div>div<div></div> It obviously does not have anything to do with the append function as the noleak function (which doens't leak) also
proposal: jQuery.browser.supported
Would it be reasonable to add a "supported" flag to jQuery, that would return true for the officially-supported browsers for the current jQuery version, so one could do: if ($.browser.supported) $(function() {...}); and not worry about the javascript failing halfway through on unsupported browsers? Sort of what Google maps does with GBrowserIsCompatible(). Danny
Jquery handling very frequent action request.
I has a button bind to a click event. $("#abc").click(functoin(){ ajaxCall(); finish do post back ; }); but when i click it very fast and frequently ... it just goes messy . .. just like a click on the button will add a tab , when i click very frequently . it will add the tab but the post back goes crazy like the content suppose to be append is the previous content. the callback function will clone the existing template and will up with value. any one experience this ?
jQuery Mysterious Code question
What does the following do? // Opera sometimes will give the wrong display answer, this fixes it, see #2037 if ( jQuery.browser.opera && name == "display" ) { var save = elem.style.outline; elem.style.outline = "0 solid black"; elem.style.outline = save; } I'm a JavaScript newbie, and to me I can't see that the code does anything at all. Please explain how this works. Under what circumstances won't the final line set elem.style.outline back
getWH()
getWH() is often the highest jQuery function in my profile. function getWH() { val = name == "width" ? elem.offsetWidth : elem.offsetHeight; var padding = 0, border = 0; jQuery.each( which, function() { padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; }); val -= Math.round(padding + border); } I traced through and there's a lot going on in curCSS(), but surprisingly a lot of the time is spent
jquery on rhino
hi just wondered - is it possible to run jQuery on Rhino ? weepy
Bad Path in Speed Test
I was wanting to try some speed improvement ideas. I saw the jquery/ speed directory and tried to play around with it. Turns out it was broken due to a bad path. See this ticket w/patch: http://dev.jquery.com/ticket/2469 Cheers, Ingy
ajax/jquery
Hey guys, Basically, i just wanted some advise on a project that i am working on for a big client of mine. Ive got a folder full of notes regards to accessibilty and how to make the website fully compliant. The problem is, that we decided to use ajax/jQuery to provide alot of the functionality on the website, but i am still searching around if ajax would be the way forward if the client is wanting a 100% accessible website. Nothing from me has been coded yet, and its just ideas that i am researching
Why does HTML construction throw away some text objects and keep others?
Hi All, My name is Ingy döt Net. I'm working a Perl/CPAN module port of jQuery, called pQuery.pm. Since I'm going over the jQuery code in detail I'll likely have a few questions. I've been using jQuery for about 4 months for work (Socialtext) and play, and love it. Here's something I just found... I noticed some time ago that jQuery functions seem to only select DOM node elements and eschew DOM text elements. This makes sense to me. However I noticed that this constructor: foo = jQuery(' aaabbb ccc')
JSON is not as safe as people think it is
Check this out: http://getahead.org/blog/joe/2007/03/05/json_is_not_as_safe_as_people_think_it_is.html Does jQuery use the eval() function on the json data? I think it should parse the data and not eval() it.
Someone has Safari 2 ?
I've got 3 emails for 2 plugins in 1 hour. All of them said: X plugin fails in Safari 2 (some specified 2.0.4). I also got a pending issue for the same thing, that I can't close, been there for weeks. Is there somebody with Safari 2, that can test these stuff with me ? Is Safari 2.0.4 entirely supported as specified here: http://docs.jquery.com/Browser_Compatibility Or it does have some known oddities ? Thanks Ariel Flesler
Efficient looping in javascript
Hello, You guys might want to check this out: http://solutoire.com/2007/02/02/efficient-looping-in-javascript/ Have not tested it with jQuery but it seems that the each() function might just be lagging
min vs pack
<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Sorry I'm on the list so much, it's just a cyclical thing I think. I'm hoping someone can tell me why you would ever choose to use min instead of pack. The reason I ask is that pack is significantly smaller (in my case) while I can't really use either for debugging purposes. At what point in my development cycle in min better than pack? <div> <span class="Apple-style-span" style="border-collapse:
Next Page