Scriptaculous in place editor cancel

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

On Oct 25, 12:36 pm, Yy Yy [email protected] 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

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 T. wrote:

On Oct 25, 12:36�pm, Yy Yy [email protected] 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

Hi

  Is  $('some-element').toggle  you are looking?(Not sure)

Sijo