Results 1 to 8 of 8

Thread: Sticky Content Script issues

  1. #1
    Join Date
    Apr 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Sticky Content Script issues

    Sticky Content Script

    http://www.dynamicdrive.com/dynamici...ckycontent.htm

    I get duplicate content in Opera (20) and Chrome, need help

    Click image for larger version. 

Name:	duplicate_content_sticky_opera_chrome.JPG 
Views:	184 
Size:	35.1 KB 
ID:	5410

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    This script might not be able to handle the type of content you're using in those browsers. But the demo page for the script works fine in those browsers, so it might be some other issue.

    If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Apr 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi, thank you for replying to my issue.

    Here is my code:

    <html>
    <head>
    <style>
    .docked{
    -webkit-transition-duration: 0.5s; /*Webkit: Animation duration*/
    -moz-transition-duration: 0.5s; /*Mozilla duration version*/
    -o-transition-duration: 0.5s; /*Opera duration version*/
    -webkit-box-shadow:0px 0px 30px gray; /*Safari shadow version*/
    -moz-box-shadow:0px 0px 30px gray; /*Mozilla shadow version*/
    box-shadow:0px 0px 30px gray; /*CSS3 shadow version*/
    }

    </style>


    <script src="jquery.min.js"></script>

    <script src="stickycontent.js">

    /***********************************************
    * Sticky Content script (c) Dynamic Drive (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit http://www.dynamicdrive.com/ for this script and 100s more.
    ***********************************************/

    </script>

    <script>

    //initialize sticky content:

    jQuery(document).ready(function($){

    $('#samplemenu').stickyit({
    gap: 5,
    stickyclass: "docked"
    })

    })

    </script>
    </head><body>
    <div id="samplemenu" style="width:180px;height:500px;overflow:hidden;">
    <iframe src="http://annonse.aftenbladet.no/salomonsen/2014/03/980x150/" width="180" height="500" frameborder="0" scrolling="no" style="float:left;height:500px;"></iframe>
    </div>
    <div style="height:1000px"></div>

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Try adding fixed position to the iframe:

    Code:
     <iframe src="http://annonse.aftenbladet.no/salomonsen/2014/03/980x150/" width="180" height="500" frameborder="0" scrolling="no" style="float:left;height:500px;position: fixed;"></iframe>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Apr 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi and thank you.
    I tried your suggestion, but it did not solve the issue.

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Apr 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi again. I see that it seems to work on the link you posted, i've altered the code, but still there are issues.

    Maby it's because there is an element above the docking banner ad? It seems to stay "fixed" till i scroll for about 500-700 pixels befor sticking to the top of the browser window.

    Please see it in action on the following url:

    http://www.aftenbladet.no/resirkulert/

    PS: I have also tested With the docking script, it Works better (when i put in a negative margin for the element) but it is not sticking smoothly, it is "jumping as i scroll"
    (This last sentence probably don't belong here, but i have been testing and testing With these two scripts, that i love, but i like the smoothness and shadow feature of the Sticky Content Script.)
    Last edited by jscheuer1; 04-04-2014 at 12:39 AM. Reason: Format

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    As far as I can tell, that page is much more complex than the relatively simple (though complex in its own way) demo I set up from the original markup you supplied. My suggestion would be to abandon the use of the script, as the page stands on its own quite well without it, and is perhaps less confusing to viewers without the sticky content or similar scripts.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. Sticky Content script
    By kattaie in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 10-24-2015, 06:09 AM
  2. Sticky Content script
    By munirvazir in forum Looking for such a script or service
    Replies: 1
    Last Post: 07-12-2012, 12:25 AM
  3. Sticky Content script change position.
    By taghaboy in forum Dynamic Drive scripts help
    Replies: 5
    Last Post: 05-20-2012, 10:27 AM
  4. Sticky Content script: Google Adsense Ad
    By adventureguys in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 03-26-2012, 11:05 AM
  5. Sticky Note Dynamic Content Script
    By jjvoice in forum Dynamic Drive scripts help
    Replies: 5
    Last Post: 07-24-2006, 07:11 PM

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
  •