Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7961299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:00:03+00:00 2026-06-04T05:00:03+00:00

I use the plugin waypoints ( http://imakewebthings.com/jquery-waypoints/ ) * EDIT : working solution :

  • 0

I use the plugin waypoints (http://imakewebthings.com/jquery-waypoints/)

*EDIT : working solution : http://pastebin.com/x95Qf7m8 *

What I’m trying to do is to load the share widget contained in my link when the “share-this” tag is scrolled down.

You may notice the use of head.ready which is just a replacement of document.ready as I use headjs to load my external scripts.

My question is simple, why is it working when triggered by a click, but not using the waypoint plugin ? Any help would be welcome

My website : http://www.entendu.info

head.ready(function() {


$('.share-this').waypoint(function(event, direction) {
   if (direction === 'down') {

    var contentId = $('.share-this').attr('rel');
    var uri = $('.share-this').attr('rev');

    e.preventDefault();
    //console.log('clicked');

    $.ajax({
   url: 'http://www.entendu.info/share',
   type: 'GET',
   dataType: 'html',
   data: {id:contentId, url:uri},
   complete: function(xhr, textStatus) {

   },
   success: function(data, textStatus, xhr) {

   $('#'+contentId).html(data);
   },
   error: function(xhr, textStatus, errorThrown) {

   }
   });

   }
   else {

      // do this on the way back up through the waypoint
   }



   });



});




<div class="content" id="{$posts[i].PID}" style="float:left">
<a href="" class="share-this" rel="{$posts[i].PID}" rev={$posts[i].name|escape:'htmlall'}">

<img src="{$imageurl}/share2.png" width="379" height="22" style="opacity: 0.5; float:left"></a>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:00:05+00:00Added an answer on June 4, 2026 at 5:00 am

    In the function you say e.preventDefault() but there is no e. Your event is named event. If you look in your console you will see the error “e is not defined”. Plus, preventing default within a waypoint handler does nothing, so I’m not sure what the point of that line is anyway.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to do the classic Sticky Element in reverse. See http://imakewebthings.com/jquery-waypoints/sticky-elements/ for an
I am trying to use this plugin: http://docs.jquery.com/Plugins/Validation Where #user_new is the id for
I am using the Waypoints Jquery plugin: http://imakewebthings.github.com/jquery-waypoints/#documentation My issue is that I want
I'm trying to use the plugin (http://www.vertstudios.com/blog/jquery-sticky-scroller-position-fixed-plugin ) on a page i'm building. I'm
In our project we use plugin for jQuery - Galleriffic ( http://www.twospy.com/galleriffic/ ), it
so I'm trying to use this plugin: http://code.google.com/p/zeroclipboard/wiki/Instructions which basically allows you to set
I'm trying to use this plugin http://valums.com/ajax-upload/ . I added a file-limit, I want
So I want to use this plugin http://docs.jquery.com/Plugins/autocomplete I want to retrieve all the
I'm trying to use this plugin http://www.cssnewbie.com/example/equal-heights/plugin.html but haven't used much javascript before. It
I try to use timepickr plugin, from http://haineault.com/media/jquery/ui-timepickr/page/ my headers: <script src=<%=ResolveUrl(~/Scripts/jquery-1.4.2.min.js)%> type=text/javascript></script> <script

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.