Snippet Support

Modifications maintained and supported by 4seven
Forum rules
This forum is moderated by 4seven!
User avatar
Martin_K
BBCoder III
BBCoder III
Posts: 121
Joined: 02 Sep 2011, 11:13
BBCodes: 10
Favourite BBCode: textarea
Favourite MOD: Newsletter Add on
Location: London, UK
Contact:

Snippet Support

Post by Martin_K »

This is what I used CSS wise:

Code: Select all

.hideme {
background:#FFFFFF url("{T_THEME_PATH}/images/forum_background.jpg") center no-repeat;
}

.hideme input[type=text]:focus, select:focus, textarea:focus {
background: #FFFFFF !important;
}
Now not sure what all these things are exactly.

What happens here is that when the user clicks in the Quick Reply box, the background image disappears immediately, for editing, but as soon as they leave the box, the image reappears, even as they are on their way to the submit button.

My own image is less transparent and thick than Stokers, so maybe I would get fewer complaints from my forum users if I made it more transparent as well.
User avatar
Martin_K
BBCoder III
BBCoder III
Posts: 121
Joined: 02 Sep 2011, 11:13
BBCodes: 10
Favourite BBCode: textarea
Favourite MOD: Newsletter Add on
Location: London, UK
Contact:

Snippet Support

Post by Martin_K »

I wouldn't mind if the background disappeared on hover, and ideally to have it reappear after hitting the submit button.
User avatar
Stoker
Site Admin
Site Admin
Posts: 3525
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Snippet Support

Post by Stoker »

Sure, if you only design for css3 browsers
Board rules! No PM support
User avatar
Martin_K
BBCoder III
BBCoder III
Posts: 121
Joined: 02 Sep 2011, 11:13
BBCodes: 10
Favourite BBCode: textarea
Favourite MOD: Newsletter Add on
Location: London, UK
Contact:

Snippet Support

Post by Martin_K »

Good point Stoker, back to javascript.

I used onhover instead of on onfocus or onmouseover, which does what I want now. When you move away from the box to press submit the text stays without the background, but if you click elsewhere on the page it reappears.

Yes, smooth fade (in and out) would be good, what is the javascript way to do this?
User avatar
Stoker
Site Admin
Site Admin
Posts: 3525
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Snippet Support

Post by Stoker »

Martin_K wrote:Good point Stoker, back to javascript.

I used onhover instead of on onfocus or onmouseover, which does what I want now. When you move away from the box to press submit the text stays without the background, but if you click elsewhere on the page it reappears.

Yes, smooth fade (in and out) would be good, what is the javascript way to do this?
My answer was to the other martin :D
'I havent tested your code.
Board rules! No PM support
User avatar
martin123456
BBCoder VI
BBCoder VI
Posts: 765
Joined: 25 Jul 2011, 13:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!
Contact:

Snippet Support

Post by martin123456 »

Stoker wrote:Sure, if you only design for css3 browsers

That would be the only downside.
User avatar
Stoker
Site Admin
Site Admin
Posts: 3525
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Snippet Support

Post by Stoker »

I have it working here with onclick and onblur.
Board rules! No PM support
User avatar
martin123456
BBCoder VI
BBCoder VI
Posts: 765
Joined: 25 Jul 2011, 13:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!
Contact:

Snippet Support

Post by martin123456 »

i have it working on jquery mouseover nice fade in/out

the jquery is

Code: Select all

$(document).ready(function() {
    $("#jshover").mouseover(function() {
        $(this).animate({
            opacity: 0
        }, 300);
    }).mouseout(function() {
        $(this).animate({
            opacity: 1
        }, 300)
    });
});​
the html part follows in a bit

edit: scrub that it breaks the counter
User avatar
Martin_K
BBCoder III
BBCoder III
Posts: 121
Joined: 02 Sep 2011, 11:13
BBCodes: 10
Favourite BBCode: textarea
Favourite MOD: Newsletter Add on
Location: London, UK
Contact:

Snippet Support

Post by Martin_K »

Well the Members don't like it so much, they are having a vote to remove it from the forum I am admin of. Contrary bunch. It seems like they don't like all of Stoker's and Rich's mods, as it makes it all too complicated for them. And I set up the f.ing organisation in the first place.


:evil:

Wonder what else I can do to piss em off, maybe use this gay avatar there?
User avatar
Stoker
Site Admin
Site Admin
Posts: 3525
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Snippet Support

Post by Stoker »

Martin_K wrote:Well the Members don't like it so much, they are having a vote to remove it from the forum I am admin of. Contrary bunch. It seems like they don't like all of Stoker's and Rich's mods, as it makes it all too complicated for them. And I set up the f.ing organisation in the first place.


:evil:

Wonder what else I can do to piss em off, maybe use this gay avatar there?
Try the admin mod prank 8-)
Board rules! No PM support
Locked