I have only had a look round at the code I have in  a wordpress install with
k2, I have not upgraded either since 2.5 came out.

Make sure you have this somewhere

jQuery(document).scroll(function() { smartPosition('.configstuff') });


possibly the k2 jquery pack includes dimensions plugin or something

-S


On 05/04/2008, Brad <[EMAIL PROTECTED]> wrote:
>
>
> I'm using some code that I found in the K2 theme for WordPress.
>
> function smartPosition(obj) {
>         // Detect if content is being scroll offscreen.
>         if ( (document.documentElement.scrollTop ||
> document.body.scrollTop)
> >= jQuery(obj).offset().top) {
>                 jQuery('body').addClass('smartposition');
>         } else {
>                 jQuery('body').removeClass('smartposition');
>         }
> }
>
> It's supposed to add and remove the `smartposition` class when the
> scrolling threshold is right.  It works perfectly in K2.
>
> I have the style
>
> body.smartposition #post-navigation {
>   background:#FFFFFF none repeat scroll 0% 0%;
>   border-bottom:1px solid #EEEEEE;
>   margin:0pt;
>   padding:10px 0pt;
>   position:fixed;
>   top:0px;
>   z-index:10;
> }
>
> In my stylesheet, but the problem is that the class isn't removing!
>

Reply via email to