Hi devs, I think it was Michael Geary who mentioned how jQuery's animated show/hide methods are rather creepy. Simultaneous animation of both height and width leads to the text constantly reflowing - I agree with Mike that thats hardly a desirable effect. As we are going for jQuery 1.3 I'd like to get some discussion going on how this could be improved. The obvious step would be remove the width-animation, and just animate the height. But that would result in animated show/hide being equivalent to slideDown/Up, wouldn't it? If we change it at all, either it should change in a way that slideDown/Up is still useful, or just remove slideDown/Up, too. Related to that: The jQuery UI/fx/enchant module provides animation via a new method, effect(type, settings), while also enhancing show/hide, eg. show("explode"). This can add quite a big of confusion, considering that show(500) animates width/height for 500ms, while show("explode") lets it explode (for whatever duration). Overloading jQuery methods is fine, overload a single argument and giving it a completely different meaning is not. In short: We need to fix animated show/hide and make sure that core and ui effects have a consistent API. Ideas? Jörn
For anyone using the jQuery testsuite, this could be handy: http://dev.jquery.com/changeset/5283 With that you can use regular expressions to select tests or module, eg. to run the core and selector module: /test/?^core|^selector Hope this helps! Jörn
Hello jQuery fellows, I'd like to invite you to support the validation plugin in one (or both) of two ways: Provide a localization in your favorite language. If you are using the validation plugin in a project, you may already have a translation ready, and you're welcome to contribute it back to the project - just mail the UTF-8 encoded file. The existing localizations are here: http://dev.jquery.com/view/trunk/plugins/validate/localization/ If you have an improvement for one of those: Thats very welcome, too. Another thing I'm starting to gather are sites using the validation plugin. This should give the plugin a bit more credibility to those who get to know it the first time. The list is here: http://docs.jquery.com/Plugins/Validation#Sites_using_the_plugin Feel free to add your site there (just edit the page) or reply on this list or mail to me directly. The format should be: * [http://yourdomain.tld/yourpageusingtheplugin yourdomain.tld] short explanation where the plugin is used At the time of writing, as an example, there is: * [http://services.newsweek.com/register.aspx newsweek.com] for the registration If you have no idea what this is about, here is an overview of the plugin: http://bassistance.de/2008/01/30/jquery-validation-plugin-overview/ Regards Jörn Zaefferer
The 1.2.1 release for the validation plugin (http://bassistance.de/jquery-plugins/jquery-plugin-validation/) is out! Among bugfixes related to remote validation and message display a few handy improvements landed: The delegate dependency is now bundled with the plugin (it was always required anyway), and the small part of the ajaxQueue plugin that was required for remote validation is now part of the validation plugin, too. So now all you need to include is the jquery.validate.js file, nothing else. Also fixed are the url and email validation methods. They now check for top-level domains (eg. the ".de" in "bassistance.de"). A version where that is still optional is included in the package via additional-methods.js. I've also improved some demos (http://jquery.bassistance.de/validate/demo/) to provide a better reference. The complete list of changes: * Bundled delegeate plugin with validate plugin - its always required anyway * Improved remote validation to include parts from the ajaxQueue plugin for proper synchronization (no additional plugin necessary) * Fixed stopRequest to prevent pendingRequest < 0 * Added jQuery.validator.autoCreateRanges property, defaults to false, enable to convert min/max to range and minlength/maxlength to rangelength; this basically fixes the issue introduced by automatically creating ranges in 1.2 * Fixed optional-methods to not highlight anything at all if the field is blank, that is, don't trigger success * Allow false/null for highlight/unhighlight options instead of forcing a do-nothing-callback even when nothing needs to be highlighted * Fixed validate() call with no elements selected, returning undefined instead of throwing an error * Improved demo, replacing metadata with classes/attributes for specifying rules * Fixed error when no custom message is used for remote validation * Modified email and url validation to require domain label and top label * Fixed url and email validation to require TLD (actually to require domain label); 1.2 version (TLD is optional) is moved to additionals as url2 and email2 * Fixed dynamic-totals demo in IE6/7 and improved templating, using textarea to store multiline template and string interpolation * Added login form example with "Email password" link that makes the password field optional * Enhanced dynamic-totals demo with an example of a single message for two fields Have fun! Jörn
I've just released an update to the <a href="http://bassistance.de/jquery-plugins/jquery-treeview-tooltip/">treeview plugin</a>. One major improvement are completely overhauled themes, based on CSS sprites that require only two images. That makes customizing them much easier, while also improving performance - less file, less filesize. Also new are lazy-loaded trees, based on Ajax and JSON. From the changelog: <ul> <li>Fixed tree control to search only for anchors, allowing images or other elements inside the controls, while keeping the control usable with the keyboard</li> <li>Restructured folder layout: root contains plugin resources, lib contains script dependencies, demo contains demos and related files</li> <li>Added prerendered option: If set to true, assumes all hitarea divs and classes already rendered, speeding up initialization for big trees, but more obtrusive</li> <li>Added jquery.treeview.async.js for ajax-lazy-loading trees, see async.html demo</li> <li>Exposed $.fn.treeview.classes for custom classes if necessary</li> <li>Show treecontrol only when JavaScript is enabled</li> <li>Completely reworked themeing via CSS sprites, resulting in only two files per theme <ul><li>updated dotted, black, gray and red theme</li> <li>added famfamfam theme (no lines)</li></ul></li> <li>Improved cookie persistence to allow multiple persisted trees per page via cookieId option</li> <li>Improved location persistence by making it case-insensitive</li> <li>Improved swapClass and replaceClass plugin implementations</li> <li>Added folder-closed.gif to filetree example</li> </ul> Have fun! Jörn
Hi folks! I've just released an update to the <a href="http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/">tooltip plugin</a>. Its mostly a bugfix release with a few small improvements. I've also moved the documentation to the jQuery wiki and restructured the folder layout to fit other plugins. From the changelog: <ul> <li>Improved bodyHandler option to accept HTML strings, DOM elements and jQuery objects as the return value</li> <li>Fixed bug in Safari 3 where to tooltip is initially visible, by first appending to DOM then hiding it</li> <li>Improvement for viewport-border-positioning: Add the classes "viewport-right" and "viewport-bottom" when the element is moved at the viewport border.</li> <li>Moved and enhanced documentation to docs.jquery.com</li> <li>Added examples for bodyHandler: footnote-tooltip and thumbnail</li> <li>Added id option, defaults to "tooltip", override to use a different id in your stylesheet</li> <li>Moved demo tooltip style to screen.css</li> <li>Moved demo files to demo folder and dependencies to lib folder</li> <li>Dropped image map example - completely incompatible with IE; image maps aren't supported anymore</li> </ul> Have fun!
Hi, I'm proud to present the 1.2 releaseo of my validation plugin. On the changelog we have: * Added AJAX-captcha validation example (based on http://psyrens.com/captcha/) * Added remember-the-milk-demo (thanks RTM team for the permission!) * Added marketo-demo (thanks Glen Lipka!) * Added support for ajax-validation, see method "remote"; serverside returns JSON, true for valid elements, false or a String for invalid, String is used as message * Added highlight and unhighlight options, by default toggles errorClass on element, allows custom highlighting * Added valid() plugin method for easy programmatic checking of forms and fields without the need to use the validator API * Added rules() plguin method to read and write rules for an element (currently read only) * Replaced regex for email method, thanks to the contribution by Scott Gonzalez, see http://projects.scottsplayground.com/email_address_validation/ * Restructured event architecture to rely solely on delegation, both improving performance, and ease-of-use for the developer (requires jquery.delegate.js) * Moved documentation from inline to http://docs.jquery.com/Plugins/Validation - including interactive examples for all methods * Removed validator.refresh(), validation is now completey dynamic * Renamed minValue to min, maxValue to max and rangeValue to range, deprecating the previous names (to be removed in 1.3) * Renamed minLength to minlength, maxLength to maxlength and rangeLength to rangelength, deprecating the previous names (to be removed in 1.3) * Added feature to merge min + max into and range and minlength + maxlength into rangelength * Added support for dynamic rule parameters, allowing to specify a function as a parameter eg. for minlength, called when validating the element * Allow to specify null or an empty string as a message to display nothing (see marketo demo) * Rules overhaul: Now supports combination of rules-option, metadata, classes (new) and attributes (new), see rules() for details In other words: Remote validation is now possible and very easy to use. Overall performance has increased a lot, and dynamic forms work by default, no extra setup or API calls necessary. The documentation is now completely moved to the docs.jquery.com wiki, featuring interactive examples for all validation methods. Official plugin page: http://plugins.jquery.com/project/validate Old plugin page: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ Demos: http://jquery.bassistance.de/validate/demo/ Documentation: http://docs.jquery.com/Plugins/Validation If you have an questions about the plugin, please post to this list and put [validate] into the subject. For bug reports, please use the jQuery bug tracker (http://dev.jquery.com/newticket) and put [validate] into the title of the new ticket. Thanks for your attention Jörn
Hi folks, the 1.2 release of my jQuery validation plugin is mostly done. I'd like to ask for feedback on this release candidate: jquery.bassistance.de/validate/jquery.validate.1.2.RC1.zip Especially if you are already using the plugin, please give this update a try! I can help you fix any migration bugs, should they occur, immediately, while your feedback assures a stable release. You need to include the plugin itself, of course jQuery, and the delegate plugin (lib/jquery.delegate.js). If you aren't using the plugin yet, check out the demos: http://dev.jquery.com/view/trunk/plugins/validate/demo/ In any case, a lot of work was spent on documentation, so you may want to check out those, too: http://docs.jquery.com/Plugins/Validation If all goes well, 1.2 should be ready by the weekend. Regards Jörn Zaefferer
I had some reports where people had a ton of radio/checkbox buttons validated and experienced very poor performance. I'm still lacking a proper performance testsuite, so I can't really verify if my experiments yield anything better, so I'd like to ask for comments. So far I had this to select all elements of the same name: checkableGroup: function( element ) { return jQuery(this.currentForm).find('[@name="' + element.name + '"]'); } My improved solution is this: checkableGroup: function( element ) { var form = this.currentForm; return jQuery(document.getElementsByName(element.name)).map(function(index, element) { return element.form == form && element || null; }); } Does everyone agree that this will always perform better then the previous solution? Any ideas for further improvements in this area? Regards Jörn
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 and zero or more plugins. The root should always contain up-to-date .min.js, .pack.js and .zip files - min for anyone who can leverage GZip, pack for those who can't, zip for those who want to download the whole package. If there is more then one demo or test page, the root demo/test page should contain links to the other pages. Any resource related only to demo/test are placed inside the demo/test folders (css, background-images, testrunner). I'm thinking about putting plugin-related resources into an "assets" folder. Eg. here http://dev.jquery.com/view/trunk/plugins/treeview/ the images folder and the css files would be moved to assets. I like assets because its short. "resources" could be more obvious, but is longer and also somewhat ambigous - resources could be anything. So all in all the structure could look like this: - plugin root * jquery.plugin.js * jquery.plugin.min.js * jquery.plugin.pack.js * jquery.plugin.zip - lib * jquery.js * other dependencies - assets * jquery.plugin.css - images * images necessary for the plugin, eg. linked as background-images in jquery.plugin.css - demo * index.html - main demo, links to other demos * other demo related files, more demos - test * index.html - main test, links to other tests * other test related files, eg. testrunner.js/css I think this could work well for normal plugins. Once its documented and adopted my plugins in SVN, it'll be easier much for people to browser for plugins and find dependencies, demos, tests, resources... I find this topic particulary interesting in regards to jQuery UI. Maybe someone already noticed that I'm still maintaining the accordion plugin (linked above) in its old place and just syncing the jquery.accordion.js and ui.accordion.js files manually. I wonder if the above structure could also be used to jQuery UI, or could be modified to be usable. We may also get to the point where we want to split plugin files into smaller files like we do with jQuery core. In that case it'll be easy enough to just put them under "src" and provide an appropiate build target. I'm happy to avoid that because I'm always forgetting to rebuild jquery when necesseary without an automatic build... As always, your input is very welcome! Jörn
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, it should be changed to 1.2.3-pre or 1.3-pre or whatever comes next. Or 1.2.2-post until the next milestone is settled. Regards Jörn
Hi, I've just release version 1.1.2 of the validation plugin. Hot from the changelog: * Replaced regex for URL method, thanks to the contribution by Scott Gonzalez, see http://projects.scottsplayground.com/iri/ * Improved email method to better handle unicode characters * Fixed error container to hide when all elements are valid, not only on form submit * Fixed String.format to jQuery.format (moving into jQuery namespace) * Fixed accept method to accept both upper and lowercase extensions * Fixed validate() plugin method to create only one validator instance for a given form and always return that one instance (avoids binding events multiple times) * Changed debug-mode console log from "error" to "warn" level So basically all the fixes that were only available using the 1.2 trunk are now available as a regular and stable release. I'm also working on the documentation: http://docs.jquery.com/Plugins/Validation#Documentation It isn't versioned yet, so you'll currently find a few 1.2 only features on that page, nonetheless, its much more up-to-date then what was available so far. Have fun! Your feedback is welcome! Jörn
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
Good news everyone! The treeview plugin version 1.3 is out, giving you an even better tool at hand to display and navigate your trees. Plugin page(s): http://jquery.com/plugins/project/treeview & http://bassistance.de/jquery-plugins/jquery-plugin-treeview/ Demos: http://jquery.bassistance.de/treeview/ - Fixes for all outstanding bugs - Added persistence features - location based: click on a link in the treeview and reopen that link after the page loaded - cookie based: save the state of the tree in a cookie on each click and load that on reload - smoothed animations, fixing flickering in both IE and Opera - Tested in Firefox 2, IE 6 & 7, Opera 9, Safari 3 - Requires jQuery 1.2+ In addition, the documentation has been rewritten and is now hosted on the jQuery documentation wiki: http://docs.jquery.com/Plugins/Treeview/treeview Have fun Jörn
Hi, I guess John is the only one who can do something about these, but perhaps they are worth a bit discussion, so: Shouldn't the front page link to the new Selectors API page? http://docs.jquery.com/Selectors Currently it still points to http://docs.jquery.com/DOM/Traversing/Selectors which is utterly outdated. I also wonder if http://docs.jquery.com/Types should be on the frontpage/main navigation. There are a lot of links from the API to that page, I think it is useful to have a direct link to the page when looking for something specific. I'd also rename "jQuery Reference API" to "jQuery API Reference". About the Getting Started section: I think there are too many links in that section. The four sublinks to "How jQuery works" aren't necessary could be rather daunting. Nice work on the site redesign, whoever is responsible for that. Though the footer is a bit too small, I see only the half of "Hosting provided by Media Temple <http://mediatemple.net/>.". -- Jörn
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 don't you ever use? Regards Jörn
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
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 they could improve my descriptions a lot. You can link to each section of the page, like http://docs.jquery.com/Types#Scope for a link to the scope section of functions. It may be necessary to extract parts of that page into child pages at some point, but so far I think the structure is fine. There is no need to keep the page free from references to jQuery - its still in the jQuery domain. But most of it should be applicable and understandable without any knowledge of jQuery. If you are interested in helping out: I think the Function and Event sections deserve currently the most attention. Regards Jörn
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="#ffffff" text="#000000"> I'm happy to present you a new release of my Accordion menu plugin for jQuery. Thanks to some essential help from John Resig on animations, this may be the first release that is actually worth its code. And its the last release as a standalone plugin (stay tuned). If you are already using the plugin: An update is highly recommended. Otherwise, why don't you give it a try? Plugin Page and Documentation: <a class="moz-txt-link-freetext" href="http://bassistance.de/jquery-plugins/jquery-plugin-accordion/">http://bassistance.de/jquery-plugins/jquery-plugin-accordion/</a> Demo: <a class="moz-txt-link-freetext" href="http://jquery.bassistance.de/accordion/">http://jquery.bassistance.de/accordion/</a> Notable changes from the last release: <ul> <li>Option "navigation" offers simplest state-saving ever, by activating elements based on the current location</li> <li>Option "autoheight" eases the accordion setup by calculating the largest chunk and setting that as the height for all other chunks</li> <li>Option "animated" eases animation setup and provides smooth and flawless animations. Using the easing plugin you can replace the default slide animation with "bounceslide" and "easeslide". Additional animations can be added as plugins to jQuery.Accordion.Animations</li> </ul> Have fun! Jörn Zaefferer </body> </html>
Hi, while working with Ext's grid component and subclassing its Ext.data.HttpProxy for some custom data handling I found that subclassing approach quite useful for configuration of larger components (read: plugins). I'd like to explore in what ways that approach could help making jQuery plugin easier to customize, whenever a simple plugin option isn't available or not enough. Ext's subclassing approach is okay, but the API rather clumsy. I'm remember seeing a little framework on this list with a really neat API, posted in the early days of this list, but couldn't yet find that again. Even more frustrating is that I remember that I searched for it before and didn't find it at that time. So links or hints and names or whatever are very welcome. -- Jörn Zaefferer http://bassistance.de
An update to the jQuery accordion plugin brings you, among minor bugfixes and a demo overhaul (http://jquery.bassistance.de/accordion/), one notable new feature: The navigation-option automatically activates a part of the accordion based on the current location (URL) of the page. The basic idea came up in the comments on the plugin page (http://bassistance.de/jquery-plugins/jquery-plugin-accordion/) and was at first implemented in Bernd Matzner's HoverAccordion (http://berndmatzner.de/jquery/hoveraccordion/). The basic idea is the same: Find the anchor in the navigation accordion that matches location.href and mark it as selected and open the part of the accordion where it is inside. This gives you a sort of state-saving without the need to generate "selected"-classes on the serverside. In addition, I've create a project on jquery.com/plugins, feel free to vote if you like it: http://jquery.com/plugins/project/accordion/ -- Jörn Zaefferer http://bassistance.de
Hi folks, I've some trouble with opacity in IE in relation to the tooltip plugin. So far the plugin used opacity only via stylesheets. The idea to set the opacity via jQuery isn't that non-obvious, but so far I never tried it. Images explain more then words, so please just take a look with IE6: http://fuzz.bassistance.de/tooltip/ -- Jörn Zaefferer http://bassistance.de