Hi, I am playing with Ajax.InPlaceEditor I hide some elements in editMode:function(id){ $(''some-element'').hide() } So when I click on edit, ''some-element'' is hidden. But when I click on ''cancel'', I want to show the ''some-element''. How can I do this? Thanks in advance! yumiu -- Posted via http://www.ruby-forum.com/.
On Oct 25, 12:36 pm, Yy Yy <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi, > > I am playing with Ajax.InPlaceEditor > I hide some elements in editMode:function(id){ > $(''some-element'').hide()} > > So when I click on edit, ''some-element'' is hidden. > But when I click on ''cancel'', I want to show the ''some-element''. > > How can I do this?Hi, you might want to look at the invoking the show() method when you click cancel. I would recommend consulting your Prototype or JQuery for further details. Good luck, -Conrad> Thanks in advance! > > yumiu > -- > Posted viahttp://www.ruby-forum.com/.
I figured it out by adding a onLeaveEditMode: showSomeElement() in options. It looks to me that onLeaveEditMode will be called in destroy and wrapUp and thus will be called after save or cancel. Can someone help me to confirm this? Thanks! yumiu Conrad Taylor wrote:> On Oct 25, 12:36�pm, Yy Yy <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> Hi, >> >> I am playing with Ajax.InPlaceEditor >> I hide some elements in editMode:function(id){ >> $(''some-element'').hide()} >> >> So when I click on edit, ''some-element'' is hidden. >> But when I click on ''cancel'', I want to show the ''some-element''. >> >> How can I do this? > > Hi, you might want to look at the invoking the show() method when > you click cancel. I would recommend consulting your Prototype > or JQuery for further details. > > Good luck, > > -Conrad-- Posted via http://www.ruby-forum.com/.