Current status of the Ning Platform is always available on the Ning Status Blog.

FORUM

NC for Hire

Ok, so I am working on a method to display latest activity module as sticky module to the top right of my site (open to suggestions).  But for now, I have a tip for you on how to make your navigation stick to the top of site on scroll.

Add this to CSS:

.JFsticky {
    position: fixed;
    width: 100%;
    left: 0;
    top: 0;
    z-index: 100;
    border-top: 0;
}

Add This to Custom Code (bottom):

<script type="text/javascript">

x$(document).ready(function() {
var stickyNavTop = x$('.navbar').offset().top;

var stickyNav = function(){
var scrollTop = x$(window).scrollTop();

if (scrollTop > stickyNavTop) {
    x$('.navbar').addClass('JFsticky');
} else {
    x$('.navbar').removeClass('JFsticky');
}
};

stickyNav();

x$(window).scroll(function() {
    stickyNav();
});
});
</script>

You need to be a member of Ning Creators Social Network to add comments!

Join Ning Creators Social Network

Email me when people reply –

Replies

  • NC for Hire

    hmm..perhaps it is conflicting with some other CSS or scripts you already have..i'll take a look..

  • NC for Hire

    doesn't look like I can even scroll as the content is too short to scroll through.. but i'll look again..

  • Now it's working.  Must be a woman - took a while to make up her mind.  *LOL*  Than you for sharing JFarrow.

  • Hi, I love this idea as my current Main page is so long. I added your code but it doesn't seem to be working... any ideas?

    Thx!

    • NC for Hire

      hard to tell without seeing it... perhaps something else you have in CSS is conflicting..

  • fwiw I realized that the tabs (being positioned left) were overlaying my green Admin. Toolbar so I removed the line that said "left 0;" and the tabs moved more center.  Just thought I'd mention it if other creators want that appearance as well.  Thanks again JF for sharing this.

    1064518070.png?width=540

  • Hello JFarrow. I love the script. Is this there anyway to add color behind the navigation that will remain (ex. the color behing the navigation will always be white rather than clear, or adapts to whatever color the page is)

    Thanks, Henry

    http://allaworldinc.ning.com

     

    • NC for Hire

      Hi Henry, are you looking to change the color dynamically or just looking for CSS code to change background of navigation?

      • Hi JFarrow, whichever one works best in keeping the navigation background a solid color (such as white) while scrolling. As of now, the background seems to be whatever the is on the page.

         

        Thanks,

        Henry

This reply was deleted.

Announcements

 

Some interesting articles related to community management, digital marketing etc. could be found in our digest. Don't hesitate to leave a feedback so we would know that we should continue :-)

Latest Activity

⚡JFarrow⌁ replied to ⚡JFarrow⌁'s discussion
TRICK: Host Your External CSS and JS Files using Dropbox
"I no longer use Dropbox for this...   I use Github....  ask me how if it is too complicated for you…"
3 hours ago
⚡JFarrow⌁ replied to ⚡JFarrow⌁'s discussion
Create a More Exciting "Featured" Email With Language Editor

still one of the most powerful tools and one of the first things I change when I start a new comm…"
22 hours ago
⚡JFarrow⌁ replied to ⚡JFarrow⌁'s discussion
How to Give Your Ning a Really Fake Voice
"These days I use Speakpage and it provides a great on the fly service, but it is limited to a singl…"
22 hours ago
⚡JFarrow⌁ replied to ⚡JFarrow⌁'s discussion
How to Create Search Feeds in Bing with a Simple Hack
"thank you brother"
22 hours ago
⚡JFarrow⌁ replied to ⚡JFarrow⌁'s discussion
How-to Control Number of Member Profiles on Member Page Using CSS
"Wow... just look how active Creators used to be!"
23 hours ago
⚡JFarrow⌁ replied to ⚡JFarrow⌁'s discussion
You May Not Know This About Facebook
"this tip worked well for me today again"
23 hours ago
⚡JFarrow⌁ replied to ⚡JFarrow⌁'s discussion
Linkedin Tip: Export Your Contacts For Import Into Ning
"yes it most definitely does work on both"
23 hours ago
⚡JFarrow⌁ updated their profile
23 hours ago
⚡JFarrow⌁ replied to Fabricio Giugni's discussion
How can I add video from Youtube on landing page?
"Simply right click on the video and open HTML/CSS then find the line where the youtube video URL is…"
23 hours ago
J.Ayvar replied to Anastasia_Ning_Support's discussion
Join our webinar on SEO
"Thank you!  i am wating for the webinar. Just 5 minutes :)"
yesterday
Anastasia_Ning_Support replied to Ceddy J's discussion
Disk Usage Enforcement
"Hello Ceddy! 
Thank you for addressing this issue here. 
We need some time to check the content of…"
yesterday
Jelena replied to Fabricio Giugni's discussion
About Ning 4.0
"Hello 
after you try the new ning 4 can you go back to ning 3 if you aren’t satisfied?"
yesterday
More…

Meanwhile, you can check our social media channels