Sticky Content Script
http://www.dynamicdrive.com/dynamici...ckycontent.htm
I get duplicate content in Opera (20) and Chrome, need help
![]()
Sticky Content Script
http://www.dynamicdrive.com/dynamici...ckycontent.htm
I get duplicate content in Opera (20) and Chrome, need help
![]()
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
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>
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
Hi and thank you.
I tried your suggestion, but it did not solve the issue.
It worked here:
http://home.comcast.net/~jscheuer1/s...ent/schelp.htm
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
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
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
Bookmarks