background preloader

JQuery

Facebook Twitter

Reading JSON with jQuery. Asp.net Dropdownlist SelectedIndexChanged Event in JQuery. Show and hide dynamically created table rows from a SELECT change. Jquery show/hide table rows. Spinner. Create a table and populate it on a popup window. Setting rounded corner types on jQuery UI Dialog. jQuery: fadeToggle() not change text of link Show / Hide. Replace anchor text with jquery. Use jquery to show/hide a div based on link href. Validation - How check if jQuery datepicker is empty. Hacking at 0300 : Understanding jQuery UI widgets: A tutorial. Last modified May 31, 2012.

Hacking at 0300 : Understanding jQuery UI widgets: A tutorial

Updated for jQuery 1.8 This was written largely to help me make sense of using UI to create my own widgets, but I hope it may help others. "Widget" to me means a user-interface element, like a button or something more complicated like a popup date picker, but in jQuery UI terms it means a class, members of which are associated with HTML elements; things like Draggable and Sortable. In fact, not everything that I would have called a widget uses $.widget; the UI datepicker does not. Dan Wellman has another tutorial that you may find helpful. Modifying Elements: Plugins That being as it may, let's use $.widget.

Let's take a paragraph of class target: <p class="target">This is a paragraph</p> This is a paragraph Now, make it more general-purpose: a plugin: Keeping State in Plugins But this pollutes the $.fn namespace terribly, with off, darker and lighter. The Problems with Associating an Object with a Plugin Solving the Problem: $.widget That's where $.widget comes in. How to Develop jQuery UI Widgets. I'm wrapping up my first jQuery UI widget (see multiselect on GitHub) and thought it would be useful to share some notes I took on the widget factory & widget development in general.

How to Develop jQuery UI Widgets

I personally found development on the factory to be quite enjoyable; a lot of functionality is available right out the box (custom events, ability to change options after initialization) and idioms you might not otherwise consider, like widget destruction. Furthermore, it imposes a clean object-literal development structure with public and private methods, making it much easier to start a project or maintain other's projects. Throughout this blog post I will be showing you various ways to modify the jQuery UI dialog widget source to add your own features.

I do not actually recommend doing this however, because widgets can just as easily be extended. The concepts are the same though and are easily adaptable to your own project. _init() and _create() Simple jQuery Modal Window Tutorial. Introduction In this tutorial, I'm going to share how to create a simple modal window with jQuery.

Simple jQuery Modal Window Tutorial

I like jQuery, it makes everything so simple and so easy. In case you don't know what's modal window. You can click here. That's an example of a modal window. In this website, I'm using facebox (inspiration from facebook). Tools. DataTables (table plug-in for jQuery) Html - How do I hide the middle of a table using jQuery. Submit A Form Without Page Refresh using jQuery. Previously on Nettuts+, Philo showed how you can use jQuery to add form validation to wordpress comments that works without any page reload.

Submit A Form Without Page Refresh using jQuery

Another great way of utlizing jQuery to enhance user experience is to not just validate, but to submit your form entirely without a page refresh. In this tutorial I'll show you how easy it is to do just that -- submit a contact form that sends an email, without page refresh using jQuery! (The actual email is sent with a php script that processes in the background).

Let's get started. What We're Building In this example, we have a simple contact form with name, email, and phone number. 10 Useful jQuery Form Validation Techniques and Tutorials. The purpose of web form validation is to ensure that the user is provided with the necessary information and help so that they can fill out and complete an online form with the minimum amount of fuss and time. Easier said than done! Validation, for many years has been a major source of debate within professional web design circles, it is such a broad and diverse subject, resulting in far too many varying, and sometimes conflicting, techniques and ideas. Basically, there is no real consistent method to follow for form validation. With javascript, and especially with jQuerys explosion in popularity, validation has become easier to implement. It has given web developers the scope to create forms that are not only accessible and visually appealing, but also, and most importantly, easy to use and understand.

jQuery plugin: Validation. This jQuery plugin makes simple clientside form validation trivial, while offering lots of option for customization.

jQuery plugin: Validation

That makes a good choice if you’re building something new from scratch, but also when you’re trying to integrate it into an existing application with lots of existing markup. The plugin comes bundled with a useful set of validation methods, including URL and email validation, while providing an API to write your own methods. All bundled methods come with default error messages in english and translations into 37 locales. If you want to support the development of this plugin, please donate to the ongoing pledgie.org campagin. The plugin is written and maintained by Jörn Zaefferer, a member of the jQuery team, lead developer on the jQuery UI team and maintainer of QUnit. Current version: 1.11.1License: MIT. Jquery slider.

This is a selection with 200 of the best jQuery sliders plugins and tutorials with a lot of differents features, we’re pretty sure you’ll find exactly what you need or been looking for a while now, so please, go ahead and enjoy. jQuery is such an amazing tool that delivers what offers: writing less and doing more, that’s why now we’d like to share with all of you this huge list where you can find all kind of plugins and tutorials for showcasing content in a slider, which can be images, photographs, videos, text, anything you’d like to put in it, with a lot of cool effects and animation. Although the tutorials are really clear and well explained, the websites also offers you feedback and support, so you’ll have no problem with installing it. If you find some kind of problem or a bug, they’re really looking forward your opinion, most of these websites keep updating their plugins. Ajax. Description: Perform an asynchronous HTTP (Ajax) request.

ajax

The $.ajax() function underlies all Ajax requests sent by jQuery. It is often unnecessary to directly call this function, as several higher-level alternatives like $.get() and .load() are available and are easier to use. If less common options are required, though, $.ajax() can be used more flexibly. At its simplest, the $.ajax() function can be called with no arguments: Note: Default settings can be set globally by using the $.ajaxSetup() function. This example, using no options, loads the contents of the current page, but does nothing with the result. The jqXHR Object. How to clear all textbox in a div container using jQuery? - Software Development.

Sharing a server-side variable with client-side. Hi there, That's a lot of questions in one question...

sharing a server-side variable with client-side

Let me try to tackle them all. First of all, you *can* share variables between server side and client side code, but not directly. It's important to understand how it works under the hood if you want to share the values of these two kind of variables. A Server side variable exists on the server, while a JavaScript variable lives on the client. How to POST radio button values through jquery. Php - How to send serialize form data using JQuery if the input element is an array. Selected Text and Value of ASP.NET DropDownList using jQuery. I recently saw a question on StackOverflow where a user wanted to retrieve the selected value of an ASP.NET DropDownList using jQuery.

Selected Text and Value of ASP.NET DropDownList using jQuery

Jquery get selected text from dropdownlist. Asp.net - Jquery Cascading Drop Down how to trigger the change event for all the dropdowns in the chain Sequencially. Asp.net - How to use JQuery with Master Pages. 1000 Popular jQuery Plugins List. jQuery Change CSS Dynamically – It’s Easy! CSS Function Demo Changing your website styles dynamically is now the craze that is taking over the web!

jQuery Change CSS Dynamically – It’s Easy!

In this short, but sweet post I will explain how to do some simple yet effective CSS tricks using jQuery. This is a must know for all you avid jQuery developers! Change Specific CSS Element It’s really easy to change CSS with jQuery this is the format of the .CSS() function. Here are some common examples: //float all divs with class .left $('div.left').css('float'); JQuery: How to hide/display a div depending on the initial state of a checkbox. How To change the HREF for a Hyperlink using jQuery. jQuery: The Write Less, Do More, JavaScript Library.

Using jQuery with ASP.NET Controls. jQuery, a lightweight (only 19kb in size) JavaScript library has become my new best friend.

Using jQuery with ASP.NET Controls

Slide Elements in Different Directions. Although jQuery has a nice set of slide methods — .slideDown(), .slideUp(), and .slideToggle() — sometimes we may want to slide an element in a different direction. Fortunately, it's pretty easy to do. Reverse the Slide Direction With the built-in slide methods, elements are shown by sliding them down and into view. But what if we want to slide something from the bottom up and into view?

The trick here is to use some judicious CSS. <div id="slidebottom" class="slide"> <button>slide it</button> <div class="inner">Slide from bottom</div></div> To get the inner div to slide up, we'll anchor its bottom edge to the bottom of the bottom of the nearest positioned ancestor (in this case, the #slidebottom div): Other properties such as width, padding, margin, and background-color have been set for these elements, but only the essential properties for modifying the slide behavior are shown above.