New jQuery plugin: linkNotify() – An inline link click notification
Reading time: About 1 minute
What does linkNotify do?
When a user clicks a link, the link text changes to “Loading…” so the user doesn’t keep clicking.
Download linkNotify() jQuery plugin
Why do I need linkNotify?
Have you ever seen someone click a link over and over waiting for the next page to load? It’s a bad habit that’s actually counter-productive because it causes the next page’s loading to start over. This user behavior phenomenon occurs because browsers do a bad job giving feedback to the user that their click was successful and the next page is loading.
So what’s the problem? Feedback proximity.
Users aren’t looking for feedback where browsers have a progress bar. Users are staring at the page where they clicked and wondering why a new page hasn’t loaded. The loading feedback needs to be closer to the action (the click). That’s why I’ve developed linkNotify—to enhance the feedback of link clicks to improve the user’s experience of control.
The sourcecode of linkNotify
1 2 3 4 5 6 7 8 9 10 11 (function($) { $.fn.linkNotify = function (notification) { notification = notification || 'Loading…'; this.not('[href^="#"]').each(function () { $(this).click(function () { $(this).html(notification); }); }); return this; }; })(jQuery);How to use it
1 2 3 4 5 6 $(function () { // on jQuery's DOM load event $('a').linkNotify(); // display "Loading..." when any link is clicked $('#content a').linkNotify('Loading your next page'); // display 'Loading your next page' on all links in the #content div });Download
13 comments skip to comment form
Gopal Raju said— 2 hours later
Firman Wandayandi said— 6 hours later
Paul Davis said— 20 hours later
Brian Cray said— 22 hours later
Web design tutorials said— 2 weeks later
KP said— 2 months later
Brian Cray said— 2 months later
Matteo said— 3 months later
Pavel said— 3 months later
Gopal Raju said— 4 months later
Evanion said— 5 months later
hell said— 7 months later
tina said— on June 9, 2009 later
Respond to this post—