New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible between DT datatable and pkgdown.js #655

Closed
Miachol opened this Issue May 6, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@Miachol

Miachol commented May 6, 2018

When I used DT datatable in the page, it raised pkgdown.js error.

Error message

ncaught TypeError: $(...).stick_in_parent is not a function
    at HTMLDocument.<anonymous> (pkgdown.js:2)
    at j (jquery-3.1.0.min.js:2)
    at k (jquery-3.1.0.min.js:2)
$(function() {
  $("#sidebar").stick_in_parent({
    offset_top: $("#sidebar").offset().top
  });
  $('body').scrollspy({
    target: '#sidebar'
  });

  var cur_path = paths(location.pathname);
  $("#navbar ul li a").each(function(index, value) {
    if (value.text == "Home")
      return;
    if (value.getAttribute("href") === "#")
      return;

    var path = paths(value.pathname);
    if (is_prefix(cur_path, path)) {
      // Add class to parent <li>, and enclosing <li> if in dropdown
      var menu_anchor = $(value);
      menu_anchor.parent().addClass("active");
      menu_anchor.closest("li.dropdown").addClass("active");
    }
  });

});
@hadley

This comment has been minimized.

Member

hadley commented May 7, 2018

(Please don't include session info unless it's explicitly asked for, or you've used reprex::reprex(..., si = TRUE) to hide it away. I've deleted it from your issue to avoid cluttering up the discussion)

@hadley

This comment has been minimized.

@hadley hadley closed this in 6fe20ba May 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment