show() hide() enable() disable()
show() hide() enable() disable()
Lapointe
Posts: 430Questions: 81Answers: 4
should have a parameter to set state as show(field,false,false) will hide field...
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Is this for Editor? There are
field().show()
andfield().enable()
methods which can be chained together - e.g.:Allan
Hi @allan
Sorry it was not the suggestion...
src code :
that should allow simple one line code
Ah - a toggle parameter! I'm with you now - thanks. I've just committed that in :-).
The
field().show()
method already has a boolean input to control the animation, so the new toggle parameter is the second parameter for the method. This will be in the next major version of Editor.Allan
Hi @allan
Very nice...
Same approach for enable disable ?
Can you tell me when we will start alpha testing ?
Bob
Hi (again)
Perhaps a global preset for animation when show, hide should be nice....
If using animation, easy, if not each show / hide need to be set to false at second parameter, and when editor.hide() or editor.show() where to pass second parameter ?
Hi Bob,
Yes, I’ve put a toggle parameter into the
field().enable()
method as well.Regarding the animation, you can use
$.fx.off = true;
to disable jQuery animations. I think attempting to use a boolean parameter to mean two different things is going to be confusing though.ALlan
I forgot to say, I will hopefully have a beta for you next week.
Allan