I'm trying to implement a solution in SP 2013 where the global navigation docks to the top of the browser as you scroll down. Like on this site.
The dev at this site provided the jquery he used to accomplish this. I'm able to get it working as you can see here (change framework to jquery 1.8.3).
I'm having some difficulty figuring out how to make this work on SP's global navigation. There are a couple of places I'm getting stuck and I have some questions about the master page in 2013. Hopefully an experienced developer can help point me in the right direction.
I'm trying to figure out the relationship with the .html and .master file. It seems like I can only edit the .html file. There are several commented out lines in the file that I find are not commented out in the .master file. Why is that? Seems like I can't edit the .master file. Can I only use the snippets feature?
I can get some test jquery to work on the master page if I add this to the html page
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>I put it in the head tag. Is that where it should go? I'd like to download the file and put in on my server instead of the link. Do I put it in the layouts folder on the server? What is the advantage / disadvantage of having the file on the server v.s. using the ajax.google link?
In the jsfiddle example, you can see they are using an id called "sticky_navigation". In doing some research, I found that I might be able to target my jquery to the SP navigation class "DeltaTopNavigation". Would that be the class to target or should I create my own? How would I create my own and does it need to be wrapped in a div?
How, when, and why would I "wrap something in a div"?
Thanks for the help and patience. I'm fairly new to this side of SharePoint.