Conventions for Plugin directory structures?
For anyone writing and using jQuery plugins: I've been trying to improve plugin directory structures for some time now. The basic idea is to find a good convention and document it. A sample of the current state is here: http://dev.jquery.com/view/trunk/plugins/accordion/ So far it consists of a browsable folder on the root directory, demo and test folders with index.html (giving you some running code http://.../plugin/demo/) and a lib folder that includes plugin dependencies. That'll always be jquery.js
Ajax (POST) Help Needed
Can some please direct me in the right direction? Here's what's going on, I'm trying to pass a value from a select / option field to be processed by a PHP script that will populate a pulldown menu. The value will then be processed into a MySQL query, if the query contains results it will populate select / option field. According to firebug, my request is being passed. From firebug: file => packageNames.php SELECT package_id, package_name FROM proposal_packages WHERE cid = "1" GROUP BY package_name
Help Test jQuery 1.2.2 (beta 2)
Hi Everyone - We've landed about 20 more bug fixes since the previous 1.2.2 beta and we'd like to do a quick sanity check before we go live. http://code.jquery.com/jquery-1.2.2b2.js Please pay special attention to $(document).ready() in Safari 3 and Opera 9, .height() and .width(), and IE garbage collection. Let us know if you encounter any new bugs. --John
Using JQuery under chrome
I tried to use the cluetip demo from a Firefox extension directory. Everything worked fine except from opening other local files used in the demo. http://plugins.jquery.com/project/cluetip The reason it was failing was that the status in xmlhttprequest was set to 0. I compared the relevant code in Dojo and Jquery and found that the missing bit was: location.protocol=="chrome:". The demo works fine with that inserted into jquery (see below). The dojo file hostenv_browser.js line 113-117 had the following
Help Test jQuery 1.2.2
Hey Everyone - We just pushed a beta copy of jQuery 1.2.2 live. We'd love for everyone to help test this release and make sure that it's in tip-top shape. Please use the unpacked version, it'll make it easier for us to spot/close bugs. http://code.jquery.com/jquery-1.2.2b.js Here's the full list of closed bugs: http://dev.jquery.com/report/22 If you spot a bug, please submit it to the bug tracker: http://dev.jquery.com/newticket Please pay special attention to $(document).ready(), .hover(). .width(),
build cleanup and improvements; plugin directory strucutes
For anyone using jQuery's ant build: I've cleaned up the build.xml, removing all the now-useless targets like lite and docs. Also added a script that replaces @VERSION with the content from version.txt, so you'll always get a build that includes a version number. On that matter I also propose to to always update version.txt to the next milestone after a release. That makes it easier to identify "latest revisions". I've changed version.txt to "1.2.2-pre" for that. Once 1.2.2 is released and tagged,
Abusing of getScript()
My application is calling getScript() at constant interval to load and then call alway the same javascript function. The loaded function is updating a display board. The problem is the memory usage is growing and growing at each call. As the application is used on a full working day without closing the navigator, the memory is burned within an hour... Is there any clean solution ?
__ie_init Error on IE6 and IE7
Hello all, I just downloaded the latest, minimized jQuery (1.2.1) and facing an odd problem on IE6 and IE7. The page doesn't load fully, and on refresh, it shows a blank page with this page source: <script id=__ie_init defer=true src=javascript:void(0)></script> I've tried various hacks that folks have talked about, but none of it works for me. It seems that the offending line is the $.ajax line below: <script type="text/JavaScript" src="inc/js/jquery.js"></script> <script type="text/JavaScript">
Wiki xml exporter
Hi, has anyone produced anything to export the wiki documentation to xml? There was talk about some mediawiki xml exporter tool some weeks ago... If anyone has started, please provide whatever you may have come up with, we need some progress on that. Regards Jörn
ob_gzhandler & IE6
As I found nothing about this problem, I report it to add my contribution to the community: When the flag ob_gzhandler is ON, either in the php.ini or using ob_start("ob_gzhandler"), and the client is using IE6, then IE6 is throwing an error when loading jQuery (maybe other libraries too): what is weird is a manual refresh with the F5 key reload the page properly... Deactivating ob_gzhandler seem to be safe, I guees this could help some guys... Regards, Cedric.
empty ajax
Only have a second, but just wanted to report that jQuery 1.2.2b is throwing an error on line 718 (see below) when an ajax calls returns nothing. [line 718] if ( object.length == undefined ) ~Sean
Redefining a Function's Prototype?
<div>I've been trying to find a post (I believe by John) that talks about redefining a function's prototype for situations where you make a calculation one and return a static value for calls there after... I can't find it for the life of me. I remember it being posted on ajaxian also. Does this ring a bell with anyone or should I dismiss it as a double shot of cafinated addiction? </div> <div> </div> <div>Cheers,</div> <div>-Jonathan</div>
finally a IE6 garbage collector patch?
This sounds like good news to me: http://erik.eae.net/archives/2007/12/14/20.07.27/ The related microsoft knowledge base article: http://support.microsoft.com/kb/942840 I wonder how much IE6 users will actually get that patch once its released... Regards Jörn
new $(window).height() functionality
I saw that 1.2 added $(window).height() functionality to jquery.js which was great. Unfortunately (for me), it doesn't appear to do exactly the same thing as jquery.dimensions.js and I was wondering if that is as intended. In FF, it looks like it returns document.body['clientHeight'] yet I expected it to return self.innerHeight Perhaps the line jQuery.browser.safari && self["inner" + name] || is incorrect and it should include other browsers in addition to safari? I'm fairly new to jQuery so I could
unit testing improvements
<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">So I recently found this blog from John:<DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><A href="http://ejohn.org/blog/tags/rhino/">http://ejohn.org/blog/tags/rhino/</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I use this framework locally with a few small patches and now finally understand why I dont like jsUnit, because I cant simulate a browser and treat
Removing event handlers on empty()?
Hey guys, Just read this blog post on removing event handlers of objects being removed and I was wondering if it was applicable to jQuery: http://www.julienlecomte.net/blog/2007/12/38/ I took a quick glance at the source and couldn't any area where functions were being removed on empty - can this lead to memory leaks? Just something that caught my eye. Thanks for all the great work you guys do! - Chris Dary
Preview Release of Batch and Viewable
I just checked in two new plugins: Batch and Viewable. Batch is a plugin that allows you to batch the results of any jQuery method, plugin into an array. I know this has been brought up on the list a few times and I believe several other libs provide this functionality. By default the batch plugin aliases the getter methods in jQuery by adding an 's' to the end (attrs, offsets, vals ...). You can all just call $(...).batch('methodName', arg1, arg*n). <a href="http://brandonaaron.net/jquery/plugins/batch/">http://brandonaaron.net/jquery/plugins/batch/</a>
put semicolon before plugins
I have a feeling that this is going to be a tough sell, but I think it would make plugins more portable without problems with asset packager. Problem: Nowdays many websites concatenate scripts into one script (e.g. :cache option in rails). However with function of the form : (function($) { ... etc }) can fail if the preceding file doesn't finish off it's commands with a semicolon. A better default which would result in better portability of plugins would be : ;(function($) { ... etc }) Just a thought
Incorrect results from .not() method
I tried to do a bit of searching before posting this, but as you can imagine, searching for something named "not" is a bit of a challenge... It seems like anytime you use .not() to exclude elements using the attribute value selector ("element[attr='value']"), it actually excludes all the elements with the given tag name instead of just the ones having the specified attribute value. I ran into this on a form where I have a radio set, and I wanted to select all the form elements except for the radio
Problem with swap()
I've encountered this intermittent, thoroughly unreliable (in terms of being able to reproduce it) problem with swap(). Basically I have an image that has borders on it. That image gets animated to change its width and/or height (plus possibly a couple of others like top and left, but immaterial here). What was happening very occasionally in Firefox, and even rarer, in IE, was that borders were getting set to zero, and I couldn't work out why or when. I completely re-factored my code, and got rid
[BUG] init creates 0 property in jQuery prototype
At two places in the init function, jQuery writes to the zero property this[0] = selector; this[0] = elem; At this point, jQuery may not have a zero property, which I think makes this slot now accessible in all jQuery objects? Anyways, if the jQuery object is filtered down to having a length of zero, it will still have a zero property, and new jQuery objects can end up with this property. The reason why this bug does not often show up is that the length is set correctly, and there is rarely a practical
JSONP timeout?
I'm currently working on building a pretty interesting framework for my day job that will rely heavily on JSONP as a technique. The recently added jsonp support to jquery core has been highly instructive (thanks!).
event namespacing
<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">I really like the notion of event namespacing and currently use it heavily. But I also use closures to define namespaces for my classes like foo.bar.goop = {/**class definitions*/}; What Id like to do is use those namespaces (as strings of course) so I can do stuff like<DIV>jQuery(document).bind("customEvent.foo.bar.goop.MyClass");</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The
UI.tabs - bug in Ajax loading?
When using UI Tabs with mixed AJAX tabs there seems to be a bit of a bug in the handling of default selected tabs. I'm starting with a page containing a fragment like this: <ul class="ui-tabs-nav"> <li><span><a href="/">Calendars</a></span></li> <li><span><a href="/city">Cities</a></span></li> <li class="ui-tabs-selected"><span><a href="#workshops">Workshops</ a></span></li> <li><span><a href="/not-even-likely.html">Test</a></span></li> </ul> <div id="workshops"> Blah </div> ... and a behavior.js
jQuery.ui not showing helper in ie 6
I just started using the jQuery ui and I'm using a simple drag and drop interface that works just like I want it, except for one thing...the helper clone I'm using isn't showing up when it is being dragged in ie 6. This functionality works fine in firefox though I haven't tried this in ie 7+. Has anyone else encountered this problem? Also, I ended up fixing the next problem by adding a counter but when I drag from one object to another the droppable.drop function gets called anywhere between 1 and
jQuery('title').html('Test'); shortcut to document.title = 'Test';
jQuery('title').html('Test'); Should this shortcut to modify the document.title property? Currently this does nothing in Firefox and returns an error in IE6. Thanks for your consideration Zach
jQuery calendar and IE 6
Ok, this is another one of those IE 6 bugs but I'm using jQuery 1.3 (I think this is right, I'm using liferay). I'm also using the calendar version 2.7. When I go to the calendar home site the calendar displays as it should over select boxes in IE 6. I downloaded both the javascript and the css files that he was using on that page and got everything to work fine for my purposes. Unfortunately the calendar does not display correctly in IE 6. When the calendar is shown it does in fact cover the select
namespacing a plugin that imports multiple methods to the jQuery object
I have developed a plugin for working with tables. The plugin will expose around ten methods to be used on a jQuery object (that contains a table element), so I feel uncomfortable about polluting the namespace with it. I am wondering if I should try to have a new table object that inherits from the jQuery object, but I don't really know how to accomplish that. So far I have come up with the following idiom for namespacing, which is kind of ugly. $( selector ).table( "table_method", method_args )
prop's for livequery
<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">That's slang for livequery rocks. I've been spending a lot of time with that plugin because it solved some issues I had, and as I actually spend some time with the code I can't but help give a shout out to Aaron Brandon et al for this powerful extension to the jQ elegance.<DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0,
Event propagation horribly slow?
Hi! I've run into a problem. I'm working on a plotting plugin with interactive features like zooming. So I need to know what the user is doing with the mouse. But the event stuff for mousemove is really slow. Basically, if you bind an empty function like this: function cb(e) {} #("#somediv").mousemove(cb); I can get Firefox to use up 100% CPU on my trusty old 950 Mhz Pentium III by moving the mouse around on the div. I'd really like to spend a couple of those precious CPU cycles executing my callback...
jQuery and WEB 2.0 architecture (SOFEA/SOUI)
Hello everybody, I'm a jQuery (very satisfied) user :-) I want to know what do you think of this "new" Web 2.0 architecture, of which I read first here: http://raibledesigns.com/rd/entry/re...ve_the_service (another post http://raibledesigns.com/rd/entry/so..._known_as_soui) I think that there's a need of js frameworks to support this architecture. Do you think that jQuery will be developed to give more support to that application architecture? For example, I think that the validation plugin is a
Testing whether something is a function
Hi, The jquery.js file for jQuery 1.2.1 contains the following curious code and comment: // This may seem like some crazy code, but trust me when I say that this // is the only cross-browser way to do this. --John isFunction: function( fn ) { return !!fn && typeof fn != "string" && !fn.nodeName && fn.constructor != Array && /function/i.test( fn + "" ); }, I expect this will sound like terribly naive, but why doesn't typeof fn === 'function' work? And doesn't the
About custom events
Can we modify bind() so that it doesn't require attachEvent or addListener? For example I wanted to use my class (function) to publish some custom events, but it fails for two reasons: 1. Given a function f, I cannot do jQuery(f).bind (customEventName, ...) because its seen as jQuery(document).ready (f).bind... 2. Even if it were accepted or if I used an object, o, in place of f, neither have attachEvent nor addListener. I can spoof it with var o= {attachEvent:function(){}}. After which I can use
Function as argument for all functions that set properties?
I've just started to look over jQuery for some projects I'm planning. I noticed that the attr() function can accept a function as it's second argument to generate the value to be set. However, none of the other functions that set text/attributes (e.g., text, val, add, etc.) can do the same. Wouldn't it be more consistent (not to mention totally cool) to give every function that sets attributes/text the ability to generate the value using a function? Why is attr() so special?
New ready event fires early in iframe in IE
I just noticed that the new ready event fails within iframes in IE. I've created a simple test case that alerts the value of document.body. <a href="http://brandonaaron.net/jquery/tickets/iframe_ready/shell.html"> http://brandonaaron.net/jquery/tickets/iframe_ready/shell.html</a> <-- alerts null (within iframe) <a href="http://brandonaaron.net/jquery/tickets/iframe_ready/test.html">http://brandonaaron.net/jquery/tickets/iframe_ready/test.html </a> <-- alerts properly (not within iframe) <a href="http://jquery.com">jquery.com</a>
Status of jQuery with Safari 2.0.4?
I just learned that jQuery 1.2.1 with Safari 2.0.4 has some issues (what can I say, I'm late to the party), that and I upgraded to Safari 3 a while ago so never experienced it firsthand. I did some searching on this list and found that 2.0.4 is blowing up on the test suite. Obviously a crash is ultimately Apple's fault, but I'm curious whether 2.0.4 is really supported by jQuery. The jQuery homepage does say compatible with Safari 2+, however, based on my searching, the test suite crashes have been
get element background colour in jquery
Hi - could anyone tell me how to get the css set background colour of an element in jquery. I have a series of divs which have ids that set the bgcolour. when a div is clicked i want to get the particular background colour for that id. i can do the click event stuff and get the id of the clicked div - but i dont knwo how to get the bgcolour. thanks for any help given
jQuery Permission Denied
Hello all, I'm having a problem with jquery in IE6. I open a page (popup) via a link and then just close it. When I then reopen this page I get a permission denied error in jquery on document.compatMode.... Did someone already have this error ? Thanks a lot .... Regards. Gen
prob class jquery listeffect
Good evening, I seek to make a presentation on a list of items (ul li). But the effects classical me enough, then I would apply an animation feature. Here is my class, which unfortunately does not work, and make this week that I am looking for a solution. my class : /*############# jquery extend class fx list ################ ############# Authors : gerits aurelien ##########*/ jQuery.fn.liFadeIn = function(settings){ var contener = this; // settings par défaut settings = jQuery.extend({ speed :
JQuery UI Tabs makes Internet Explorer load forever
I'm using IE7 on Windows XP and have encountered a problem when trying to incorporate JQuery and UI Tabs 3 into my site. About 10% of the times the page just loads forever and the tabs never initializes. First I thought it was a problem with my implementation, but then I tried to reproduce the error at the official site at http://stilbuero.de/jquery/tabs_3/ which game the same symptoms. Here is a screenshot how it looks on my computer: http://www.butix.se/tmp/jquery_uitabs_hangs.jpg The error wont
Next Page