开发者

JQTransform Reset Form?

I'm trying to do a reset on a form styled with JQTransform, in particular sele开发者_如何学编程cts, which are replaced by lists. There is a function jqTransformReset(); but I cant get it working for some reason.

Has anyone had any success with this?


Your code keeps the value because when i "submit" the form, the old value is sent. This worked fine to me.

$("div.jqTransformSelectWrapper").each(function() {
         $(this).show();
         $("ul li:first a", this).click();
});


You have to pass jqTransformReset() the form element as a parameter.

There is some additional information regarding jqTransform and <select> elements over here:

http://www.code-pal.com/the-select-problem-after-using-jqtransform-and-its-solution/


To reset the select drop downs in jqTransform you can use this code in jqTransformReset() in jquery.jqtransform.js

$("div.jqTransformSelectWrapper").each(function() {
        $("div span", this).text($("ul li:first", this).text());
        $("ul li a.selected", this).removeClass("selected");
        $("ul li:first a", this).addClass("selected");
    });
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜