Better Page Anchors with Anchor Slider Plugin
Here is another simple Mango Blog plugin that uses jQuery to make clicking internal links less jarring by adding an easing effect to select links. The obvious use is the back to top links found in footers, or at the end of long pages. Normally clicking one of these links jumps the page up or down to the specified section. The problem is that the quick jumping can be jarring and disorientating for some users.
Thankfully Cedric Dugas created a jQuery plugin that slides the page up or down with a nice easing effect so that users realize that they are in fact on the same page and not on a new one.
I really like these small finishing touches to sites. I feel that they make it a much more pleasurable experience.
The jQuery needed is only a few lines of code so at first it hardly seamed necessary to make a Mango Blog plugin from it. But after adding it to 4 sites in a row, I thought it made more sense to go ahead and make it a standalone plugin.
How to use it
Using the Anchor Slide plugin is easy. Just add a class of 'anchorSlide' to your links. That's It! jQuery does the rest! I recommend adding a new empty class in your themes adminEditor.css file of .anchorSlide {} so that you can use it within the TinyMCE editor.
Download Anchor Slider
- Plugin version:
- 0.1
- Last Updated:
- 2009-10-17
- Requires:
- Mango Blog 1.3+
- Auto-install URL:
- http://anchorslider.riaforge.org/index.cfm?event=action.download
Tags: Mango Blog · Plugins
11 comments so far ↓
I'm pretty comfortable with javascript but I don't know beans about jQuery.
I tried deleting and reinstalling both jquery and anchorslide plugins and clearing the cache and even reloading the Mango config.
What else can I check?
BTW - the effect works fine when I use the "Top" link at the bottom of this page so I don't think it is my browser.
Thanks either way.
I just deactivated Anchorslider and noticed Lightbox2 was also throwing an error. When I deactivated that and reactivated Anchorslider everything worked fine.
Thanks again!
P.S. I've only been using Mango for a couple of weeks and my site is not ready for prime time but I'm loving every minute of it. I can't tell you the hours I spent being frustrated by Wordpress. Thanks for all of your hard work and taking the time to explain things.
I'm using your plugin and having the same issue as Mickey...pretty much exactly the same, but I'm using Dreamweaver. On my local test browser it's working fine, but when I upload everything live to the test site, it's just skips to the anchors regularly...any suggestions??
have you verified that the jquery and anchorslide plugins are both being called on the server? Most of the time the problem is permissions. When mango blog activates a plugin the assets are copied to a public folder located at /assets/plugins/ the easiest way to verify, is to view source and copy/paste the src links into a new browser window. If you get a 404 error then it's permissions.
If that checks out then make sure you do not have other plugins causing a conflict by either adding their own versions of jquery or scriptaculous.
If you still haven't fixed it, then provide me a link to the site where I can view the code and see if I can figure it out.
The test site is here: www.kinercom.com/KinerWebTest
The weirdest part is that when I don't use the whole URL to call the scripts it works on my local server, but not on my uploaded site. When I add the whole url, it doesn't work locally...
This is pretty strange! I would love for you to take a look at the source code and give me some advice--I'd totally appreciate it! :D
Thank you!
Are you even using Mango Blog for this site. It appears that you are calling your files directly from within the web root and not from within a mango blog template. This plugin was written for mango blog. From the looks of it. You need help with your html template and not with the plugin.
Seriously, though, thank you for looking into my source code-I super appreciate it. Actually by removing the 2nd jquery call worked!
So thank you again for your prompt response, I am looking more into Mango for future projects. :)
Can it is possible to remove the anchor tags from the url when some body refresh the page at any moment. Actually i am facing the problem when somebody refresh the page after clicking on any anchor tag , that anchor tag remains on the url and opens the same page portion having that anchor tag.
Help will be appreciated. Thanks.
Leave a Comment