jQuery Archives - David Yin's Blog https://www.yinfor.com/archives/jquery Tech geek. Life geek. Wed, 20 Mar 2019 08:03:29 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.1 https://www.yinfor.com/wp-content/uploads/2016/09/cropped-icon-120x120.png jQuery Archives - David Yin's Blog https://www.yinfor.com/archives/jquery 32 32 jQuery v1.3 release https://www.yinfor.com/2009/01/jquery_v13_release.html https://www.yinfor.com/2009/01/jquery_v13_release.html#respond Wed, 14 Jan 2009 17:57:10 +0000 https://www.yinfor.com/?p=641 jQuery released its 1.3 version. The new features shown as below: * Sizzle: A sizzlin’ hot CSS selector engine. * Live Events: Event delegation with a jQuery twist. * jQuery Event Overhaul: Completely rewired to simplify event handling. * HTML...

The post jQuery v1.3 release appeared first on David Yin's Blog.

]]>
jQuery released its 1.3 version.
The new features shown as below:
* Sizzle: A sizzlin’ hot CSS selector engine.
* Live Events: Event delegation with a jQuery twist.
* jQuery Event Overhaul: Completely rewired to simplify event handling.
* HTML Injection Rewrite: Lightning-fast HTML appending.
* Offset Rewrite: Super-quick position calculation.
* No More Browser Sniffing: Using feature detection to help jQuery last for many more years to come.
Full release note here.
Download jQuery here.

The post jQuery v1.3 release appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2009/01/jquery_v13_release.html/feed/ 0
jQuery UI 1.5 release https://www.yinfor.com/2008/06/jquery_ui_15_release.html https://www.yinfor.com/2008/06/jquery_ui_15_release.html#comments Mon, 09 Jun 2008 09:52:12 +0000 https://www.yinfor.com/?p=554 It is good news Today. One API to Rule Them All Stability, Debugging, Testing and jquery.simulate The Need for Effects: Enter Enchant Roll Your Own Themes: ThemeRoller! Plugin Stabilization and Enhancements jQuery UI v1.5: Final Release: http://ui.jquery.com/download

The post jQuery UI 1.5 release appeared first on David Yin's Blog.

]]>
It is good news Today.
One API to Rule Them All
Stability, Debugging, Testing and jquery.simulate
The Need for Effects: Enter Enchant
Roll Your Own Themes: ThemeRoller!
Plugin Stabilization and Enhancements
jQuery UI v1.5:
Final Release: http://ui.jquery.com/download

The post jQuery UI 1.5 release appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2008/06/jquery_ui_15_release.html/feed/ 1
$() Factory Function, CSS Selectors, XPath Selectors, Custom Selectors https://www.yinfor.com/2008/02/_factory_function_css_selector.html https://www.yinfor.com/2008/02/_factory_function_css_selector.html#respond Fri, 15 Feb 2008 10:29:24 +0000 https://www.yinfor.com/?p=491 No matter which type of selector we want to use in jQuery – be it CSS, XPath, or custom – we always start with the dollar sign and parentheses: $() $() Factory Function Let’s see some more common examples: A...

The post $() Factory Function, CSS Selectors, XPath Selectors, Custom Selectors appeared first on David Yin's Blog.

]]>
No matter which type of selector we want to use in jQuery – be it CSS, XPath, or custom – we always start with the dollar sign and parentheses: $()
$() Factory Function
Let’s see some more common examples:
A tag name: $(‘p’) gets all paragraphs in the document.
An ID: $(‘#some-id’) gets the single element in the document that has the corresponding some-id ID.
A class: $(‘.some-class’) gets all elements in the document that have a class of some-class.
CSS Selectors
Chile combinator
>

$(‘#selected-id > li’)

Find each liste item (li) that is a child (>) of an element with an ID of selected-id (#selected-id).
Negation pseudo-class
not

$(‘#selected-id > li:not(.horizontal)’)

Find each list item that do not have a class of horizontal, which is a child of #selected-id.


XPath Selectors

$(‘a[@title]’)

This is a attribute selector, so use @ symbol inside square brackets. Example means that to select all links that have a title attribute.
Here are more examples about XPath Selectors.
Attribute selectors accept regular-expression-like syntax for identifying the beginning(^) or ending($) of a string. And also take an asterisk(*) to indicate an arbitrary position within a string.

$(‘a[@href^=”mailto:”]’)

href attribute begins with mailto

$(‘a[@href$=”.pdf”]’)

href attribute ends with .pdf.

$(‘a[@href*=”mysite.com”]’)

href attribute has mysite.com inside.
Custom Selectors
I just put some sample here.

$(‘tr:odd’)
$(‘tr:even’)
$(‘td:contains(“David”)’)
$(‘th’).parent()
$(‘tr:not([th]):even’)
$(‘tr:not[ht]:odd’)

The most recommended complicated way.

$(‘td:contains(“David”)’).parent().find(‘td:eq(1)’).addClass(‘highlight’).end().find(‘td:eq(2)’).addClass(‘highlight’);

The post $() Factory Function, CSS Selectors, XPath Selectors, Custom Selectors appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2008/02/_factory_function_css_selector.html/feed/ 0
basic of basic https://www.yinfor.com/2008/02/basic_of_basic.html https://www.yinfor.com/2008/02/basic_of_basic.html#respond Wed, 13 Feb 2008 18:56:48 +0000 https://www.yinfor.com/?p=489 1) $() function is actually a factory for jQuery object. It is the object encapsulates zero or more DOM dlements. 2) .addClass() and .removeClass() They are fairly self-explanatory. Its only parameter is the name of the class to add or...

The post basic of basic appeared first on David Yin's Blog.

]]>
1) $() function is actually a factory for jQuery object. It is the object encapsulates zero or more DOM dlements.
2) .addClass() and .removeClass()
They are fairly self-explanatory.
Its only parameter is the name of the class to add or remove.
Here are two samples.


Sample 1.

$(document).ready(function() {
$('.poem').addClass('emphasized');
});</div>
It is the function to add class 'emphasized' on the class 'poem'.
Sample 2.
<div class="scode">$(document).ready(function() {
$('span:contains(language)').addClass('emphasized');
});

This sample try to find the span which contains “language”, and add a class ’emphasized’ on these span.

The post basic of basic appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2008/02/basic_of_basic.html/feed/ 0
jQuery category created https://www.yinfor.com/2008/02/jquery_category_created.html https://www.yinfor.com/2008/02/jquery_category_created.html#respond Wed, 13 Feb 2008 15:31:19 +0000 https://www.yinfor.com/?p=488 From today, I will start to learn jQuery framework. I compared the popular five Ajax toolkits, including jQuery. Now I choose jQuery as my Ajax toolkit. I will build a Inout Board system by PHP, MySql and jQuery. To replace...

The post jQuery category created appeared first on David Yin's Blog.

]]>
From today, I will start to learn jQuery framework. I compared the popular five Ajax toolkits, including jQuery. Now I choose jQuery as my Ajax toolkit.
I will build a Inout Board system by PHP, MySql and jQuery. To replace current Pentacle InOut Board based on the ASP and Access.
There is category, Ajax, in this blog. I changed it to jQuery to focus on the jQuery only.
OK, I will put some notes or tips of jQuery into David Yin’s Blog – jQuery.

The post jQuery category created appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2008/02/jquery_category_created.html/feed/ 0
jQuery 1.22 Released https://www.yinfor.com/2008/01/jquery_122_released.html https://www.yinfor.com/2008/01/jquery_122_released.html#respond Tue, 15 Jan 2008 09:21:55 +0000 https://www.yinfor.com/?p=454 jQuery announced the 1.22 release. It is a bug fix version. Over 120 bug fixes and the the changes make the speed improved. The package is very small. * jQuery Minified (15kb with Gzipping) * jQuery Packed (28kb) * jQuery...

The post jQuery 1.22 Released appeared first on David Yin's Blog.

]]>
jQuery announced the 1.22 release. It is a bug fix version. Over 120 bug fixes and the the changes make the speed improved.
The package is very small.
* jQuery Minified (15kb with Gzipping)
* jQuery Packed (28kb)
* jQuery Regular (93kb)
You can download it from the official site.
The big news is Google use the jQuery in their Google Code site.
Now, Happy Birthday to jQuery.

The post jQuery 1.22 Released appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2008/01/jquery_122_released.html/feed/ 0
Validation – jQuery Plugins https://www.yinfor.com/2008/01/validation_jquery_plugins.html https://www.yinfor.com/2008/01/validation_jquery_plugins.html#respond Wed, 09 Jan 2008 23:07:40 +0000 https://www.yinfor.com/?p=448 I make a web form which have about 25 fields. Including date, text, number. I need a tool to doing the client side data validation. Because I am learning jQuery. So I decide to go to jQuery official site. I...

The post Validation – jQuery Plugins appeared first on David Yin's Blog.

]]>
I make a web form which have about 25 fields. Including date, text, number. I need a tool to doing the client side data validation.
Because I am learning jQuery. So I decide to go to jQuery official site. I think there may be some plugins.
Actually there are lots plugins related to form validation.
I chose the Validation.
It is preaty simplay when I need to validate some fields.
The code is:

$(document).ready(function(){
$("#commentForm").validate();
});

The latest vesion is 1.1.2
It has following features:
* Easy to setup
* 19 built-in validation methods, more in addition
* Inline-error-message display (no more alerts!), heavily customizable
* Extensible: Add your own validation methods and reuse them
* Use inline metadata or plugin options to specify your validation rules
* Carefully designed interaction: Doesn’t annoy users with errors they hadn’t a chance to fix, but gives them feedback as early as possible when fixing errors, via filtered keyup and blur events on each field
Validation home site

The post Validation – jQuery Plugins appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2008/01/validation_jquery_plugins.html/feed/ 0
Top 10 jQuery resources https://www.yinfor.com/2008/01/top_10_jquery_resources.html https://www.yinfor.com/2008/01/top_10_jquery_resources.html#respond Fri, 04 Jan 2008 10:55:22 +0000 https://www.yinfor.com/?p=438 Now to learn jQuery, everyone needs some studying resources. The basic ones are shown as below: 1) jQuery official site. Download jQuery 1.2.1 2) Documents of jQuery from official site. 3) Visual jQuery 4) jQuery Basics: From jquery.com, this tutorial...

The post Top 10 jQuery resources appeared first on David Yin's Blog.

]]>
Now to learn jQuery, everyone needs some studying resources.
The basic ones are shown as below:
1) jQuery official site.
Download jQuery 1.2.1
2) Documents of jQuery from official site.
3) Visual jQuery
4) jQuery Basics: From jquery.com, this tutorial steps you through launching code on document ready, making something happen on click, adding a class, creating special effects, and working with callbacks.
5) Getting Started with jQuery: Covers a simple “hello world” example, selector and event basics, AJAX, FX, and usage and authoring of plugins. Knowledge of JavaScript and the document object model (DOM) is required.
6) 15 Days of jQuery: Tutorials and example code for table striping, safer mailto links, stylesheet switching, multiple-file uploading, and more.
7) jQuery Reference Guide: It is a reference book. $33.44 on Amazon.
8) Learning jQuery
9) jQuery UI
10) The last will be my Blog, Ajax section.
Spend two weeks on them. I think I can use jQuery to make some web application with some Web 2.0 features.

The post Top 10 jQuery resources appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2008/01/top_10_jquery_resources.html/feed/ 0
Ajax toolkit comparison https://www.yinfor.com/2008/01/ajax_toolkit_comparison.html https://www.yinfor.com/2008/01/ajax_toolkit_comparison.html#comments Thu, 03 Jan 2008 22:16:33 +0000 https://www.yinfor.com/?p=437 Ajax is very useful in Web 2.0 world. What is Ajax? Ajax is Asynchronous JavaScript and XML. Now so many different Ajax toolkits online. Which one is better? Actually, if you doing some search on the web, you will find...

The post Ajax toolkit comparison appeared first on David Yin's Blog.

]]>
Ajax is very useful in Web 2.0 world. What is Ajax?
Ajax is Asynchronous JavaScript and XML.
Now so many different Ajax toolkits online. Which one is better?
Actually, if you doing some search on the web, you will find a lot of different results.
Some one said the Prototype is best, another one said Dojo is perfect.
How can we find the right one for yourself?
Let me compare them.
Now I have five Ajax toolkits here.
1) Prototype
2) Dojo
3) Yahoo
4) Google
5) jQuery
First of all, the learning curve is the most important issue. For the guy who has some php or other language skill, jQuery is the easiest one. You don’t need a lot of time to learn it. After jQuery are, Prototype, Yahoo, Dojo, and Google.
Next is ease of use. They are almost same. Only Google is a little bit weak.
For the file size, jQuery is smallest one.
There are many issue to be compared.


For me, I just choose the jQuery, which can save my learning time.
How about you?

The post Ajax toolkit comparison appeared first on David Yin's Blog.

]]>
https://www.yinfor.com/2008/01/ajax_toolkit_comparison.html/feed/ 1