Hi everyone, i'm new on creating velocities templates, and I wonder how to hide and show a table or any html element using a button, if it's clicked the element is shown, clicked again and this should be hidden, I've seen a similar question here but it didn't involved an event trigger by an action like clicking a button, thanks!
Hello,
If you define your own velocity template then you should use Jquery to hide an element. Something like AJS.$("element").hide(). Have a look at jquery documentation.
So I can use jquery with my template so I could use something like
<button onClick="AJS.$("element").hide()">
but my question is this, if I'm gonna use jqueryl for this, besides adding the library in the head should I need more configuration to make jquery works on my template? I ask this because I tried doing this with javascript but the templates shows only velocity sintaxis and ignores completely my js.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Where do you change your velocity file? Is it a plugin you are developing?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you mean that you change velocity templates for email? And you want Javascrit to work in outlook or something like this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The template is on the server with the rest of my classes, then is sent as one more parameter of the server method, I guess this compiles with the rest of the app if you mean change by compile.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you develop a Jira plugin, then JQuery must be available there. But I really do not understand what you develop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.