Giving back to the community! I couldn’t find how to dynamically add a class to an element on the forum, so here’s one way in case you’ve been wondering and aren’t on the higher end of the forum users (I quickly and happily concede to being on the lower end). I’m confident other people have other methods.
This shows how to make something pop to the front when you roll over it by adding a class to it.
Normal:
On mouse-over of BACK:
First I dragged a jquery library into the Resources:
Then, I add the class inside the Header HTML. In this case, it’s called “front” and it simply pushes the layering index to the front with a positive z-index:
Then return to Resources and add 2 functions:
Function 1 I named “push_to_front” and Function 2 I named “return_from_front”. They look like this:
You now have to hook up your Objects to run the javascript function, which will add the class you’ve defined in the Head HTML. This is done in the Actions by selecting the BACK element:
I admit, little things can be lost in the forums. Very good explanation. I would just like to point out that Hype has a built in tool for this
You still use the same “mouseover” and “mouseout” actions but instead of using jQuery you can use Hype’s built in setters (or getters) in this example using the setter method. (You will find these in the list bottom left of the function screen).
Hype also has a property you can use that is “element” which points to the element calling the function also. So, I would run a function like so, on “mouseover”
Using this technique, how would one procedurally animate a value, like opacity for example? Obviously, sure, I can create an Animation, but if I can make one function dynamically apply it to whatever the current Element is, that would save an immense amount of work and project management.
Ah, wow, ok. Eye-opening Reply here DBear. I just shifted my self-assessment of my skills to ever further down on the user-knowledge list This is extremely helpful.