Page 2 of 3

Snippet Support

Posted: 29 Nov 2012, 18:11
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.

Snippet Support

Posted: 29 Nov 2012, 18:13
by Martin_K
I wouldn't mind if the background disappeared on hover, and ideally to have it reappear after hitting the submit button.

Snippet Support

Posted: 29 Nov 2012, 18:17
by Stoker
Sure, if you only design for css3 browsers

Snippet Support

Posted: 29 Nov 2012, 19:11
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?

Snippet Support

Posted: 29 Nov 2012, 19:46
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.

Snippet Support

Posted: 29 Nov 2012, 21:25
by martin123456
Stoker wrote:Sure, if you only design for css3 browsers

That would be the only downside.

Snippet Support

Posted: 29 Nov 2012, 21:40
by Stoker
I have it working here with onclick and onblur.

Snippet Support

Posted: 29 Nov 2012, 21:49
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

Snippet Support

Posted: 29 Nov 2012, 22:37
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?

Snippet Support

Posted: 29 Nov 2012, 22:44
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-)