Skip to content
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
Closed

Incompatible between DT datatable and pkgdown.js #655

Miachol opened this issue May 6, 2018 · 2 comments

Comments

@Miachol
Copy link

@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
Copy link
Member

@hadley 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 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants