GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Make a background image clickable? (https://gfy.com/showthread.php?t=1000027)

Brujah 12-01-2010 02:03 PM

Make a background image clickable?
 
Can you make a background image clickable? I've tried a few different ways without much success yet. One method worked mostly, but since the page has a jquery slider there was a conflict. Everytime the slider changed, it would trigger the onclick and open the new window repeatedly.

djroof 12-01-2010 02:06 PM

also waiting the answer...

DateDoc 12-01-2010 02:08 PM

http://xavisys.com/css-trick-turning...lickable-link/

Brujah 12-01-2010 02:13 PM

In my example, it's the body background image I want to make clickable. It's for skinning a site, or cobranding it.

I created a div#wrapper around everything that contains the background image. I added an onclick event with a location.href to redirect to the other site. It works, but triggers the redirect with each slider movement.

pornguy 12-01-2010 02:15 PM

Nice one. I like that

fris 12-01-2010 02:24 PM

you could do it with jquery using .click()

just create a div thats abs position at 0,0

$("#bgad").click( function() {
// do stuff;
});

fris 12-01-2010 02:33 PM

Code:

<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript">
 
$(document).ready(function() {
    $("div[href]").click(function () {
        window.location = $(this).attr("href");
    });
});
 
</script>
<div href="http://www.google.com">
    My Div Link
</div>

maybe you can mess around with it

Brujah 12-01-2010 03:35 PM

My test page is working so far. I'll try it on a working site later.
http://exxxpired.com/test.html

djroof 12-01-2010 04:01 PM

Quote:

Originally Posted by DateDoc (Post 17741242)

thanksssssssssssssssss

RyuLion 12-01-2010 04:05 PM

I was gonna give you rep for this thread but..
lol..

fris 12-01-2010 07:15 PM

Quote:

Originally Posted by RyuLion (Post 17741568)
I was gonna give you rep for this thread but..
lol..

giving gfy rep is so 90s

CYF 12-01-2010 07:30 PM

nice trick, thanks


All times are GMT -7. The time now is 12:27 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc