顯示具有 jquery 標籤的文章。 顯示所有文章
顯示具有 jquery 標籤的文章。 顯示所有文章

2007/11/15

jquery-form

This is our first jquery plugin, and we're very thrilled to release it. jquery-form provides on-the-fly form generation with:
  1. declarative syntax
  2. good default semantic
It's very questionable about why people even need to generate a whole form all in javascript, and my saying is that this is one kind of future. It looks like this when you use it:
$("#form1").form({
    legend: "Quiz #4",
    params: {
        "Title": "What's the answer ?",
        "your_answer": {
            label: "Your Answer",
            value: "42"
        }
    }
})
.find(":submit").val("Save").end()
.submit(function() {
    $("#message").html("You just submit that form");

    setTimeout(function() { $("#message").empty(); }, 5000);

    return false;
});
At this moment you can only see text fields generated, and it's not very customizable yet. More and more type of traditional fields, or smart fields, are being integrated into this branch. So stay tuned. Please visit it's official page for more details: http://code.handlino.com/wiki/jquery-form