Month: October 2011
[jquery] xxx.fn.funtionName() {} is prototype
Prototype
All objects have a prototype property. Whenever the interpreter looks for a property, it also checks the prototype. jQuery uses that extensively to add methods to jQuery instances.
var form = $(“#myform”);
form.clearForm; // undefined
form.fn.clearForm = function() {
return this.find(“:input”).each(function() {
this.value = “”;
}).end();
};
form.clearForm() // works for all instances of jQuery objects, because the new method was added to the prototype
(This example needs clarification: how does it modify the prototype when the word “prototype” doesn’t appear anywhere? The implication is that form.fn is simply an alias for form.prototype, but if that’s the case then it should be explained. :-?)
In javascript:the definitive guide 5 edition,dont add attibute to Object.prototype
super strong html5 photobook editor
check empty string? if(strValue) is already enough
jquery onlyInt validation
disable the auto complete of browser (so annoying sometime u click on a input field and pop sth out)
cookies, using php or js?
use js pls
php setCookies cant trigger by user if he press “BACK” button
[js] quick revise js
read this, web developer
[js][php] language solution
Javascript null, undefined and default value?
http://stackoverflow.com/questions/2559318/how-to-check-for-undefined-or-null-variable-in-javascript
example:
var option = para || {};
option.color = option.color || “#B0B0B0” ;
option.height = option.height || 1;
old jquery dun hv parseXML function, add it yrself
ignore enter submit form by ie and other browser
http://stackoverflow.com/questions/1000597/event-preventdefault-function-not-working-in-ie-any-help
event.preventDefault ? event.preventDefault() : event.returnValue = false;
event.preventDefault = many browser
event.returnValue = ie 🙂
[js] read The Infamous Loop Problem to know more about always get the last element when event trigger and can learn more abt scoping too!
[js] a quite good tutorial for js beginner
batch rename and thumbnail
batch edit image:
infraview
batch rename program:
CKrename
amfphp, zend php [client server]
advice to jquery append, html, remove vs hide/show
pls dun depends on remove , append
they perform badly and hv bug with complicated tag
always use hide / show for module switching!
u already face in urbanmonk, y wrong again in vierzen!
[js] always need to advise : how to make object in js
html word wrap attribute for diff browser
white-space: pre-wrap; /* CSS3 */
white-space: -moz-pre-wrap; /* Firefox */
white-space: -pre-wrap; /* Opera <7 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* IE */
white-space: normal !important; /* IE 7*/
ref:
http://stackoverflow.com/questions/1638223/is-there-a-way-to-word-wrap-text-in-a-div
http://stackoverflow.com/questions/3553353/problem-with-word-wrap-in-ie7
jquery plugin template
quite good jquery plugin template
http://www.whatheaven.com/fileupload/upload/jquery_slideshow.js
[jquery] very good to modify this to combo box
[wp] related post
jquery bubble tip
[jquery] combobox, and can type yr own text too
wordpress change upload file config
[jquery] read this if u want to write plugin
some example of online photo, card design and print system
photo
———–
snapfish
urphoto
photo create
-> bubblepix
-> purrprint
fujiflim
kodak
momento au
card
———–
moo
canvas
———–
fabness