background preloader


Facebook Twitter mvc - jQuery upload file using jQuery's ajax method (without plugins)


Regex. Sélecteur RegExp pour jQuery. Traduction de l’article de James Padlosey : Regex Selector for jQuery. il y a quelques temps, j’ai publié un article (traduction) expliquant combien c’était ultimement génial d’étendre les sélecteurs de filtres de jQuery. En partant de ça, voici quelque chose de nouveau : un sélecteur par expressions régulières. les sélecteurs (CSS 3) d’attributs actuels de jQuery permettent une notation par expressions régulière basique, mais rien qui s’approche de ceci. :regex Utilisation C’est assez simple à utiliser, vous avez besoin de passer un attribut et une expression régulière à tester. // Sélectionne tous les éléments dont l'id commence par une voyelle : $(':regex(id,^[aeiou])'); // Sélectionne tous les divs dont la classe contient un chiffre : $('div:regex(class,[0-9])'); // Sélectionne toutes les balises script dont la source contient jQuery : $('script:regex(src,jQuery)'); // Oui, je sais que le dernier exemple peut être fait avec les sélecteur d'attributs CSS3.

Amusez-vous bien ! Regex - Regular expression field validation in jQuery. Checking if Cookies are Enabled. UPDATE: The information contained on this page is ancient and obsolete.

Checking if Cookies are Enabled

Seek counsel elsewhere! One of the uncertainties facing any web developer are the myriad browser configurations of different end-users. Some users may disable cookies due to fear that their personal information is being compromised, while the more security-paranoid may even disable JavaScript. This can pose a problem for web mechanisms that rely on cookies to store session identification and other neccessary information. Consequently, there may often be occasions where one wishes to check whether an end-user has cookies enabled. The JavaScript Method The simplest way to check for cookies is via JavaScript.

A snippet of code using the function above was executed when you loaded this page. You have cookies ENABLED One of the disadvantages of the method above is that it requires JavaScript. The Standard Server-Side CGI Method Browsers with cookies disabled leave this environment key undefined. . #! #! #!


Grep. Échange d’objets JSON entre PHP et JavaScript, facile grâce à jQuery – Hooba Studios. UI. Menu. Autocomplete. Jquery Form. jQuery Form Plugin. The following code controls the HTML form beneath it.

jQuery Form Plugin

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.

Upload Button

How to select a radio button with jQuery. A simple example to select a radio button with jQuery dynamically.

How to select a radio button with jQuery

A radio buttons group, with a name=”sex”. <input type="radio" name="sex" value="Male">Male</input><input type="radio" name="sex" value="Female">Female</input><input type="radio" name="sex" value="Unknown">Unknown</input> 1. To display the selected radio button value. $('input:radio[name=sex]:checked').val(); 2.


TreeView. Code Generator. Jquery4Java. Tutorial. Starting With jQuery - How to Write Custom Validation Rules. This series of posts on using jQuery with no prior knowledge comes to its fifth iteration.

Starting With jQuery - How to Write Custom Validation Rules

Today, I'm going to look more in depth at the Validation Plug-in. We'll be looking at what rules the Validation Plug-in comes with out of the box followed by an example of how to create your own rules. In addition to the typical project that I typically supply, I am also including a list of custom Validations that I have used to hopefully make everyone's life a little easier. If you would like to review the previous posts in this series, please feel free to review the links below: Required Downloads to use the Examples: In order to use the Validation plug-in, you'll need to add a few things to your web page: Code Downloads for this Post: Source Code Download: Starting With jQuery - Custom Validation Just the Rules File: Starting With jQuery - Additional Validation A Look at some of the Built-In Validation Rules: Creating a Custom Validation Rule: Putting it all Together: