() ve bulanıklığı(), dize değeri geçen ama neden ne ulaşacak [nesne nesne] nedir? parametre geçişi: fonksiyonlarına
Her (başarıyla her textarea dize değeri elde) ve bir var dizeyi depolamak - Ovar value_default = $this.val();
Bu var
$this.focus(function (value_default) {..})
içine pass - Ben yanlış geçirerek ben?
Bu value_default
uyarmak ben [nesne Oject] alacak - alert (value_default); bunu görmek gerekiyorsa
Aşağıda ...
$(".autohide").each(function(){
/* set the variable and store its value */
var $this = $(this);
var value_default = $this.val();
var parent_autohide = $this.parents('form');
var parent_button = $('input[type=submit]',parent_autohide).parents("div:.item-form").hide();
var parent_marginbottom = parseInt($this.parents("div:.item-form").css("marginBottom"));
$this.parents("div:.item-form").css({margin:'0px'});
alert(value_default); // I will get the string value of each textarea element
$this.focus(function (value_default) {
alert(value_default); // I will get [object object]
var $this = $(this);
$this.elastic();
$this.parents('div:.item-form').css({margin:'0px 0px '+parent_marginbottom+'px 0px'});
var $this_parent = $this.parents('form');
var $this_button = $('input[type=submit]',$this_parent).parents("div:.item-form").show();
}).blur(function(value_default){
alert(value_default); // I will get [object object]
var $this = $(this);
var value_current = $this.val();
if (value_current == value_default)
{
$this.css({ height: 'inherit'});
$this.parents('div:.item-form').css({margin:'0px'});
var $this_parent = $this.parents('form');
var $this_button = $('input[type=submit]',$this_parent).parents("div:.item-form").hide();
}
});
});
çok teşekkürler tüm kodudur.
düzenleme:!
IE üzerinde hataya neden yaptığını bilmek -
$this.css({height: 'inherit'}); // this line will create error on IE
$this.css({height:''}); // IE likes this
yüzden IE diğer tarayıcılar gibi üstelemezler o inherit sorunun ne ??
(function (value_default) {..})' aslında işleve 'value_default' iletmediğinizi. Sen value_default' Alert'ünüz neleri gösterir IE7 – climbage