background preloader

JQuery

Facebook Twitter

jQuery Form Plugin. The following code controls the HTML form beneath it. It uses ajaxForm to bind the form and demonstrates how to use pre- and post-submit callbacks. AJAX response will replace this content. The following code controls the HTML form beneath it. It uses ajaxSubmit to submit the form. This page gives several examples of how form data can be validated before it is sent to the server. The following login form is used for each of the examples that follow. Form Markup: <form id="validationForm" action="dummy.php" method="post"> Username: <input type="text" name="username" /> Password: <input type="password" name="password" /> <input type="submit" value="Submit" /> </form> First, we initialize the form and give it a beforeSubmit callback function - this is the validation function.

Validate Using the formData Argument Validate Using the jqForm Argument Validate Using the fieldValue Method Note You can find jQuery plugins that deal specifically with field validation on the jQuery Plugins Page. <? <? <? JQuery Form Wizard. jQuery-1.5-Visual-Cheat-Sheet.pdf (application/pdf-Objekt) jQuery Templates, Data Link, and Globalization Accepted as Official jQuery Plugins. The jQuery library has a passionate community of developers, and it is now the most widely used JavaScript library on the web today. Two years ago I announced that Microsoft would begin offering product support for jQuery, and that we’d be including it in new versions of Visual Studio going forward. By default, when you create new ASP.NET Web Forms and ASP.NET MVC projects with VS 2010, the core jQuery library is now automatically added to your project.

Earlier this year at the MIX 2010 conference I announced that Microsoft would also begin contributing code to the jQuery project. During one of my keynotes, John Resig -- the creator of the jQuery library – joined me on stage and talked a little about our participation and discussed an early prototype of a new client templating API for jQuery. Official jQuery Plugins As official jQuery plugins, the plugins will be maintained as part of the jQuery project. Starting today, you can download these plugins by visiting the jQuery website. Summary. Accordion Script With Multi-Level Support.

This updated accordion script is powerful and lightweight at only 1.2kb. It now includes multi-level support, the option to allow multiple panels to expand concurrently, and a hide/show all toggle. I have reverted the markup to a div based structure to eliminate any validation issues with the definition tables in the previous version. Check back for more posts and scripts soon. To initialize an accordion use the following code: You must create a new accordion object before initialization. This script has been tested in all major browsers and is available free of charge for both personal or commercial projects under the creative commons license.

Update 6/16/2009 The script has been updated with a couple bug fixes, performance tweaks, and feature requests. You can now expand a particular section by its index, for example parentAccordion.pr(0,1), with the second parameter being the index of the section. Click here for the demo. Click here to download the source code.

jQuery: The Write Less, Do More, JavaScript Library.