Hi, Is there any way that when I click on an image it will execute a css code ?. I explain: I have an effect that by placing it in Application Properties> Styles, causes an image to rotate by mouseover (and indicating the ID). What I want is for the rotation to take place when the user clicks on the image. With the Rotate function of NeoAppBuilder does not work the same (it is very abrupt change), in contrast with the routine is much smoother. The problem is that CSS does not allow it, just visited or hover, and I would need something like onClic
Thank you!
Execute a css code when I click on an image
Moderator: Neosoft Support
Re: Execute a css code when I click on an image
Palamar:
http://www.w3schools.com/jquery/css_css.asp shows you how to do this using jQuery (built into NeoAppBuilder).
I did a Google search using phrase javascript to change css ... and it returned http://www.w3schools.com/js/js_htmldom_css.asp ... so you can place appropriate javascript code in your Image Object's onClick event routine.Is there any way that when I click on an image it will execute a css code ?.
http://www.w3schools.com/jquery/css_css.asp shows you how to do this using jQuery (built into NeoAppBuilder).
Post the css that works with hover ... perhaps the same css can be setup for another class e.g. 'isClicked' ... and then the javascript code in the object's onClick event can just change the object's class to 'isClicked' ... of course, you will need another event to change the class back to something like 'isNotClicked'I have an effect that by placing it in Application Properties> Styles, causes an image to rotate by mouseover (and indicating the ID). What I want is for the rotation to take place when the user clicks on the image. With the Rotate function of NeoAppBuilder does not work the same (it is very abrupt change), in contrast with the routine is much smoother. The problem is that CSS does not allow it, just visited or hover, and I would need something like onClic
Re: Execute a css code when I click on an image
Hey, thanks. I have been able to do something by mixing css and js and it has worked. I will have to see that, instead of changing a single parameter, change the whole class (or execute one, for example, a class that has an animation). Regards!
Re: Execute a css code when I click on an image
Palamar:
jQuery provides functionality to perform a custom animation of a set of CSS properties. ...examples on this page ... http://api.jquery.com/animate/ ... might help you achieve your goals.
jQuery provides functionality to perform a custom animation of a set of CSS properties. ...examples on this page ... http://api.jquery.com/animate/ ... might help you achieve your goals.
Re: Execute a css code when I click on an image
Take a look at JQuery addClass() and removeClass() methods:
http://www.w3schools.com/jquery/jquery_ref_html.asp
Also try my "PowerApp" plugin as it has a lot of usefull functions.
Regards
http://www.w3schools.com/jquery/jquery_ref_html.asp
Also try my "PowerApp" plugin as it has a lot of usefull functions.
Regards
Luis Hernández - SinLios Soluciones Digitales
http://sinlios.com
http://sinlios.com
Re: Execute a css code when I click on an image
Gracias a Luishp y Gaev por el dato, estoy viendo todo, desde ya he logrado lo que necesitaba con js...
Thanks to Luishp and Gaev for the data, I'm seeing everything, from what I already achieved what I needed with js ...
Thanks to Luishp and Gaev for the data, I'm seeing everything, from what I already achieved what I needed with js ...