开发者

Prototype hide/show

开发者 https://www.devze.com 2022-12-28 13:15 出处:网络
I am a Javascript/jQuery/Prototype newcomer and I have a page that has a Prototype function to get info from a database and put it into some input fields. This was made before I came to work on this s

I am a Javascript/jQuery/Prototype newcomer and I have a page that has a Prototype function to get info from a database and put it into some input fields. This was made before I came to work on this site and now I've been asked to add a hide/show div function.

I tried it in jQuery and there were clashes with the two frameworks, (as fo开发者_运维知识库und in my previous question).

My question now is, how would I go about building a show/hide function in Prototype? I think it will be easier to do it this way than to re-build the info grabber.

The page I want to add this to is here. (the green "ny kunde" button should show the div directly but one below it newCustomer.

I found this resource: Hide show div with Prototype but I have no idea on how to implement it.

Thanks. :)


You can use jQuery by following these instructions to stop from clashing with other libraries.

Prototype provides the Element.hide() and Element.show() methods which means you can hide a div with ID #hello with:

$('hello').hide();
0

精彩评论

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

关注公众号