Mouse Over BBCode

Ordinary BBCode Database
BBCodes that need nothing else than installation through ACP
There is no support here! Only Read Access!
Locked
User avatar
BBCode Bot
BBCoder IV
BBCoder IV
Posts: 239
Joined: 04 Mar 2010, 15:04
Location: bbcode table

Mouse Over BBCode

Post by BBCode Bot »

Mouse Over BBCode

Author: TechnoTriz
Description: The Mouse Over BBCode allows You To Post An Image That Changes Into Another Image When Mouse Is Hovered Above It.
Image

BBCode:

Code: Select all

[moimg={URL1}]{URL2}[/moimg]
HTML:

Code: Select all

<img onmouseover="Javascript: this.firstsrc=
this.getAttribute('src'); this.secondsrc=
'{URL2}'; this.setAttribute('src',this.
secondsrc);" alt="" onmouseout="Javascript: this.setAttribute
('src',this.firstsrc);" src="{URL1}" />
Helpline:

Code: Select all

MoImg: [moimg=(first img url)](2nd image url)[/moimg]
Example:

Code: Select all

[moimg=http://www.phpbb3bbcodes.com/images/billede16lille.jpg]http://www.phpbb3bbcodes.com/images/billede8lille.jpg[/moimg]
Demo:
[moimg=images/billede16lille.jpg]images/billede8lille.jpg[/moimg]
wijo
BBCoder II
BBCoder II
Posts: 17
Joined: 27 Jun 2010, 10:09

Re: Mouse Over BBCode

Post by wijo »

Is it possible to change the code with a resized format of the image. So the showed image is (with bbcode) resized (as in: viewtopic.php?f=2&t=217) and when mouseover the image will be shown in original size.
KukY13
BBCoder III
BBCoder III
Posts: 96
Joined: 26 Jun 2010, 16:23
Contact:

Re: Mouse Over BBCode

Post by KukY13 »

wijo » 09 Jul 2010, 13:08 wrote:Is it possible to change the code with a resized format of the image. So the showed image is (with bbcode) resized (as in: viewtopic.php?f=2&t=217) and when mouseover the image will be shown in original size.
So a smaller picture is displayed at first, and on mouse-over, it is displayed in it's full size?
Image
wijo
BBCoder II
BBCoder II
Posts: 17
Joined: 27 Jun 2010, 10:09

Re: Mouse Over BBCode

Post by wijo »

Yes exactly.
KukY13
BBCoder III
BBCoder III
Posts: 96
Joined: 26 Jun 2010, 16:23
Contact:

Re: Mouse Over BBCode

Post by KukY13 »

wijo » 09 Jul 2010, 15:09 wrote:Yes exactly.
Ok. Wait until I write the code...
Image
KukY13
BBCoder III
BBCoder III
Posts: 96
Joined: 26 Jun 2010, 16:23
Contact:

Re: Mouse Over BBCode

Post by KukY13 »

Code: Select all

[imgres]{URL}[/imgres]

Code: Select all

<img width="150" src="{URL}" onmouseover="this.style.width='100%'" onmouseout="this.style.width='150px'">
It is a 150px width thumbnail, and on mouse-over it scretches itself in width as much as it can.
Image
wijo
BBCoder II
BBCoder II
Posts: 17
Joined: 27 Jun 2010, 10:09

Re: Mouse Over BBCode

Post by wijo »

Super :thumb: Thank you very much!
Locked