Elxis CMS Forum
Support => Technical support => Topic started by: Amigamerlin on November 19, 2012, 10:45:08
-
Hello you all,
anyone can explain me how sintax to use "onmouseover" tinymce event?
I have an image with link and I would like to show another image when mouse come over this image.
Thank you you all.
-
Hello Amigamerlin,
In the edit content items page where you have your image, click the insert/edit image icon.
In the advance tab, check Alternative image, then put a link into for mouse over and the return link of either the original image or another into for mouse out.
-
You need some javascript and you can not write javascript in the editor.
Do this:
switch editor into html mode add an onmouseover event on the element you want, for example:
<img src="http://www.example.com/images/mydir/original.png" onmouseover="dosomething(this, 'hello.png')" onmouseout="dosomething(this, 'original.png')" />
Create dosomething function and place it in a js file that it is included by your template.
function dosomething (obj, img) {
obj.src = 'http://www.example.com/images/mydir/'+img;
}
-
The tinymce editor has it built in.
-
Oh sorry, I am used to do everything by hand :)
-
Thank you datahell, xmanhattan !!!
You all are precious !!!