Playing with JQuery Validation Library, Part 2 | Elegant Code - 2 views
-
The new part is the remote in the script. You give it the name/location of your web service to call to validate the field, and the field name/value are passed in.
-
1: $('#UserNameForm').validate({ 2: rules: { 3: userNameEdit: { required: true, remote: "<%=Url.Action("VerifyUserName", "Account") %>" } 4: } 5: });
Grails - The search is over. - 0 views
12 Tips to improve your jQuery code | Geekology - 2 views
-
DOM manipulation is one of the slowest operations JavaScript (and hence, jQuery) can perform.
-
Use IDs instead of classes in selectors
-
When you need to perform multiple methods on elements, jQuery can chain those methods together.
- ...2 more annotations...
Configurable Security Policies (CAPS) - 0 views
overbyte :: Editor [0.1.1 Beta] - 1 views
placeholders and currying « Two Guys Arguing - 1 views
Meet the JavaScript Development Toolkit - 2 views
JavaScript setTimeout Function - JavaScript Timing Events - 0 views
-
JavaScript setTimeout Function - JavaScript Timing Events November 16, 2007 by Blogging Developer JavaScript features a couple of methods that lets you run a piece of JavaScript code (javascript function) at some point in the future. These methods are: * setTimeout() * setInterval() In this tutorial, I'll explain how setTimetout() method works, and give a real world example. You may find the details of setInterval() method in JavaScript setInterval Function - JavaScript Timing Events setTimeout() window.setTimeout() method allows you to specify a piece of JavaScript code (expression) will be run after specified number of miliseconds from when the setTimeout() method is called. Syntax var t = setTimeout ( expression, timeout ); The setTimeout() method returns a numeric timeout ID which can be used to refer the timeout to use with clearTimeout method. The first parameter (expression) of setTimeout() is a string containing a javascript statement. The statement could be a call to a JavaScript function like "delayedAlert();" or a statement like "alert('This alert is delayed.');". The second parameter (timeout), indicates the number of miliseconds to pass before executing the expression. Example An alert box will be shown 5 seconds later when you clicked the button. clearTimeout() Sometimes it's useful to be able to cancel a timer before it goes off. The clearTimeout() method lets us do exactly that. Its syntax is: clearTimeout ( timeoutId ); where timeoutId is the ID of the timeout as returned from the setTimeout() method call.
JQuery HowTo: Create callback functions for your jQuery plugins & extensions - 1 views
-
$.extend({ myFunc : function(someArg, callbackFnk){ // do something here var data = 'test'; // now call a callback function if(typeof callbackFnk == 'function'){ callbackFnk.call(this, data); } }});$.myFunc(someArg, function(arg){ // now my function is not hardcoded // in the plugin itself // and arg = 'test'});
-
$.extend({ myFunc : function(someArg, callbackFnk){ // do something here var data = 'test'; // now call a callback function if(typeof callbackFnk == 'function'){ callbackFnk.call(this, data); } } }); $.myFunc(someArg, function(arg){ // now my function is not hardcoded // in the plugin itself // and arg = 'test' });
Inheritance Patterns in JavaScript - 2 views
-
This article discusses the advantages of the pseudoclassical pattern over the functional pattern. I argue that the pattern used by the Closure Library paired with the Closure Compiler removes existing hazards while I also examine the hazards introduced by the functional pattern (as defined in The Good Parts). First let me demonstrate what I mean by the functional pattern.
Google Closure: How not to write JavaScript - 3 views
-
“It’s a JavaScript library written by Java developers who clearly don’t get JavaScript.”
-
Unfortunately, unlike the built-in properties supplied by Object.prototype, custom properties added to Object.prototype will show up as an object property in any for-in loop in the page.
-
custom properties added to
- ...3 more annotations...
« First
‹ Previous
461 - 480 of 657
Next ›
Last »
Showing 20▼ items per page