开发者

Create a (edit) hyperlink in front of dropdownbox with jQuery

I have a table with some data. All data is contained in dropdownboxes and textbox. But it isn't easy to see, what is newly written input and what is data from the database.

So I want to create a (edit) after these boxes, and replace the boxes with a literal where the contained value in the dropdownbox stands. When the edit-butt开发者_JS百科on is pushed the literal goes away and the dropdownbox appears instead, so it is possible to edit the data. This is all, the jQuery don't have to save the data to database, I have functionality to that in a save-button.

I don't want to use any extra plugin to jQuery, because it seems to be a fairly simpel task.

Any good ideas?


Thw whole code i cant write here, change as your wish.I didn't clear your question. try this
when click edit

$(document).ready(function(){
 $(".edit").click(){
 $(".dropdown").show("slow");
 $(".edit").hide("slow");
 });

stylesheet.css

.dropdown
{
display:none;
}

after edit just reverse the code;

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜