Comments (10)
Hi, thanks for your feedback, how does it behave in detail? Does it jump to the wrong position or does it not jump at all? How did you implement the links? Standard a-tags to the anchors or some custom jQuery animation?
from jinvertscroll.
No animation, just standard anchor tags in an ul pointing to divs with ids. It doesn't jump to the link, instead it just pushes the tag down a bit each click no matter which link i click. So if i repeating click any given link i reach the bottom of the page.
I originally wanted to make it work with a smooth scrolling plugin but saw the issue and stripped it down to just regular a-tags and the problem still came up. I can send a link to the page I mocked up a bit later.
from jinvertscroll.
Yes, please send us a link, so we can look into the issue.
from jinvertscroll.
Heres a link to a modified version of the example page you guys provide. If i place the content i want to navigate to with links inside a div that has the horizontal js applied to it, the links don't work correctly on the content. If I remove the class thats hooks the js in, then the nav works normally. Not sure if theres something I might not being doing, but thought this might be an issue with the plugin.
http://wadefuller.com/test/tester/
from jinvertscroll.
I've also tried adding normal anchor tags < a href="#about">About and linking it to < div id="about" style="width: 960px;left: 3800px;">About Us</ div> and it doesn't link up. Does it have something to do with it scrolling horizontally and not vertically.
By the way, the plugin is awesome! Very intuitive.
from jinvertscroll.
Hi, we gave a look at the example you provided and the issue you have.
To link at parts of the page, you have to create some anchor tags and position them vertically, for your example the code would be:
Html (add this after the nav-element):
Stylesheet:
.anchors
{
position: relative;
}
.anchors #100
{
position: absolute;
top: 0;
}
.anchors #200
{
position: absolute;
top: 850px;
}
.anchors #300
{
position: absolute;
top: 1700px;
}
.anchors #400
{
position: absolute;
top: 2550px;
}
At the moment you need to create these elements manually,
since the plugin does not auto-generate this markup currently.
Let me know if it works, so i can close the issue.
Best regards
Pixxelfactory
from jinvertscroll.
It looks like it works! The anchors are grouped below the nav and above the content separately. Thanks!
from jinvertscroll.
Hello,
Is the example on the specific page working?
I have exactly the same issue. My sample page is http://www.beta.dart.com.cy/mf/
Can you please advise how to make anchors work?
Thanks in advance,
from jinvertscroll.
Hi,
as stated above, you need to create a container div, wich holds the invisible anchors, for your example this would be:
<div class="anchors">
<a name="home" id="home"></a>
<a name="products" id="products"></a>
<a name="health" id="health"></a>
<a name="wheretobuy" id="wheretobuy"></a>
<a name="contact" id="contact"></a>
</div>
Then, exchange your current links with one that link to the actual anchors like this:
<div class="menu-holder">
<a class="menu-home" href="#home"></a>
<a class="menu-products" href="#products"></a>
<a class="menu-health" href="#health"></a>
<a class="menu-wheretobuy" href="#wheretobuy"></a>
<a class="menu-contact" href="#contact"></a>
</div>
Add the anchor positioning to your styles:
.anchors a
{
display: block;
position: absolute;
}
#home
{
top: 1800px;
}
#products
{
top: 3650px;
}
#health
{
top: 5250px;
}
#wheretobuy
{
top: 6900px;
}
#contact
{
top: 7500px;
}
And finally, change your current menu scrolling script with this one:
$('.nav a').on('click', function(e) {
e.preventDefault();
var top = $($(this).attr('href')).position().top;
$('html, body').animate({scrollTop: top+'px'}, 1200);
});
That's it
Best regards
pixxelfactory
from jinvertscroll.
Is there a simple way to calculate (depending on screen, element sizes etc) the TOP value needed for these links? I've some automatically generated content and can't figure out how to translate % scroll to it.
from jinvertscroll.
Related Issues (20)
- working with jQuery v1.11.1 HOT 5
- Typo on website HOT 3
- Start scrolling at a given point only HOT 6
- How can i implement smooth scrolling. HOT 7
- How to implement waypoint horizontal navigation with jInvertScroll ? HOT 15
- Bower package HOT 1
- Callback Function on init HOT 2
- Different "Scenes"
- How to fix on mobile ? HOT 9
- anchors issue
- Creating 'Next' and 'Prev' links
- Start scroll in middle of page
- how to 'stop' the inverse scroll HOT 1
- How do I vertical align my content? HOT 1
- Scroll Bar position HOT 3
- how to implement it in wordpress HOT 1
- Body Height HOT 1
- Mouse click and drag to scroll
- Elementoffset scroll to the center of the element
- Slow performance on ipad HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jinvertscroll.