Make a background image clickable?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Brujah
    Beer Money Baron
    • Jan 2001
    • 22157

    #1

    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
    JuicyDevils.gr Owner
    • Jan 2004
    • 25505

    #2
    also waiting the answer...

    Comment

    • DateDoc
      Outside looking in.
      • Feb 2005
      • 14243

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

      Comment

      • Brujah
        Beer Money Baron
        • Jan 2001
        • 22157

        #4
        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.

        Comment

        • pornguy
          Too lazy to set a custom title
          • Mar 2003
          • 62912

          #5
          Nice one. I like that
          PornGuy skype me pornguy_epic

          AmateurDough The Hottes Shemales online!
          TChicks.com | Angeles Cid | Mariana Cordoba | MAILERS WELCOME!

          Comment

          • fris
            Too lazy to set a custom title
            • Aug 2002
            • 55679

            #6
            you could do it with jquery using .click()

            just create a div thats abs position at 0,0

            $("#bgad").click( function() {
            // do stuff;
            });
            Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

            Comment

            • fris
              Too lazy to set a custom title
              • Aug 2002
              • 55679

              #7
              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
              Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

              Comment

              • Brujah
                Beer Money Baron
                • Jan 2001
                • 22157

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

                Comment

                • djroof
                  JuicyDevils.gr Owner
                  • Jan 2004
                  • 25505

                  #9
                  thanksssssssssssssssss

                  Comment

                  • RyuLion
                    • Mar 2003
                    • 32369

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

                    Adult Biz Consultant A tech head since 1995
                    Affiliate Support: Chaturbate | CCBill Live

                    Comment

                    • fris
                      Too lazy to set a custom title
                      • Aug 2002
                      • 55679

                      #11
                      Originally posted by RyuLion
                      I was gonna give you rep for this thread but..
                      lol..
                      giving gfy rep is so 90s
                      Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                      Comment

                      • CYF
                        Coupon Guru
                        • Mar 2009
                        • 10973

                        #12
                        nice trick, thanks
                        Webmaster Coupons Coupons and discounts for hosting, domains, SSL Certs, and more!
                        AmeriNOC Coupons | Certified Hosting Coupons | Hosting Coupons | Domain Name Coupons

                        Comment

                        Working...