The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Hover-over text

2 posters

Go down

Hover-over text Empty Hover-over text

Post by Anzo March 22nd 2016, 2:46 pm

I have an image and I want to add a paragraph that can show up when I hover over the image.

Also, can it be done like a pop up? You hover over and when you click or something you get a pop up that has a paragraph or something.
Anzo
Anzo
Forumember

Posts : 358
Reputation : 8
Language : English/Arabic
Location : Baghdad - Iraq

http://www.duelacademy.net/forum

Back to top Go down

Hover-over text Empty Re: Hover-over text

Post by Ange Tuteur March 22nd 2016, 3:17 pm

Hmm.. you could use this plugin I wrote to install a popup module.

Then an example of what you could do with it ;

HTML :
Code:
<img id="popup-paragraph" src="http://i84.servimg.com/u/f84/18/21/41/30/vash10.png"/>

JavaScript using the popup :
Code:
$(function() {
  var img = document.getElementById('popup-paragraph');
  if (img) {
    img.onclick = function() {
      FA.Popup.open('', 'Popup Example', function(popup) {
        popup.innerHTML = 'Hello world !';
      });
    }
  }
});
Clicking the image should open a popup with the text : "Hello world !"

The API for the popup is in the second post : https://help.forumotion.com/t143260-a-popup-module-for-your-forum#976021
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum