0

I have a script which do the following things:

http://jsfiddle.net/KVDBB/

-Value attribute of input field can be blank - after entering showing div with change button

-Input already has some value before the page loads - then it shows the div with change button

But the problem is that it uses replaceWith function and replaces the input - while it`s needed to submit the form.

Please help to improve the script for it just to hide input and not replace it.

Thanks in advance!

4

1 に答える 1

1

サンプルはこちらhttp://jsfiddle.net/deerua/KVDBB/3/

$("#consumer-email").blur(function(){
    $(this)
    .attr("readonly","readonly")
    .addClass("noborder");
    $('.changeEmail').show();
}).blur();

$('.changeEmail').bind('click', function(e){
    $("#consumer-email")
        .removeAttr("readonly")
        .removeClass("noborder ");
    $('.changeEmail').hide();
});

入力幅の非表示の境界線を使用し、属性を無効にするだけです </p>

于 2012-06-14T14:16:51.053 に答える