SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Dec 2009
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Set stripe ad display delay

    I use a stripe ad at the top of my site, and would like to delay the display of it until the visitor starts scrolling down the page, has scrolled Xpx, etc....is this possible?

    An alternative I considered, was delaying the display of it by X seconds. I tried -moz-transition-delay: 10s;, but it did not work.

    My stripe ad is all div's and css:

    Code:
    .stripe-ad { font-weight: bold; text-align: center;}
    .stripe-ad a { text-decoration: underline;}
    -Scott

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,598
    Mentioned
    411 Post(s)
    Tagged
    7 Thread(s)
    This really sounds like a job for JavaScript. Would you like this moved to the JavaScript forum, or do you want to try something simpler with CSS?

  3. #3
    SitePoint Enthusiast Baylisstic's Avatar
    Join Date
    Jul 2010
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you go the javascript route take a look at this page:
    .scroll() – jQuery API

    It should be easy to do with jQuery - there is a nice example at the bottom of that page too.

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,821
    Mentioned
    158 Post(s)
    Tagged
    4 Thread(s)
    As Ralph said this is really a js question but I thought I'd have a go anyway and came up with this. Scroll down by 300px and then the advert will appear.

    It may not be the best solution but seems to work although you will probaby get a much better answer in the JS forum.

  5. #5
    SitePoint Member
    Join Date
    Dec 2009
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    This really sounds like a job for JavaScript. Would you like this moved to the JavaScript forum, or do you want to try something simpler with CSS?
    It sounds that way...can you move it, along with the replies?

    @Baylisstic - thank you.

    @Paul O'B - excellent! I'll work off of what you started with...thanks.

    -Scott

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,598
    Mentioned
    411 Post(s)
    Tagged
    7 Thread(s)
    Off Topic:

    Thread moved to JS forum.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •