mkhairi / materialize-sass

Materializecss rubygem for Rails Asset Pipeline / Sprockets
http://materialize.labs.my/
MIT License
805 stars 243 forks source link

Scrollspy Uncaught Error #88

Closed davidrichey closed 8 years ago

davidrichey commented 8 years ago

I am working on a scrollspy nav with the example provider in the docs http://materializecss.com/scrollspy.html

My goal is to implement this with another jquery function show the navbar but I am getting an error Uncaught Error: Syntax error, unrecognized expression: a[href=#introduction]

This prevents any further jquery from running.

Example View

<div class="row">
  <div class="col s12 m9 l10">
    <div id="introduction" class="section scrollspy">
      <p>Content </p>
    </div>

    <div id="structure" class="section scrollspy">
      <p>Content </p>
    </div>

    <div id="initialization" class="section scrollspy">
      <p>Content </p>
    </div>
  </div>
  <div class="col hide-on-small-only m3 l2">
    <ul class="section table-of-contents">
      <li><a href="#introduction">Introduction</a></li>
      <li><a href="#structure">Structure</a></li>
      <li><a href="#initialization">Intialization</a></li>
    </ul>
  </div>
</div>

<script type="text/javascript">
  $(document).ready(function(){
    $('.scrollspy').scrollSpy();

    console.log('Not Executing')
  });
</script>
mkhairi commented 8 years ago

https://github.com/Dogfalo/materialize/issues/2779

davidrichey commented 8 years ago

Thank you for the info. I saw you added in the updates for scrollspy. Are you planning on releasing a updated version of the gem?

mkhairi commented 8 years ago

@davidrichey Sure, for now, you can update gem direct from master branch. I will published gem version with same as official materialize release later.

davidrichey commented 8 years ago

It is causing an error using the master branch using aws beanstalk. Just curious no urgency @mkhairi

davidrichey commented 8 years ago

New version pushing soon? @mkhairi

mkhairi commented 8 years ago

@davidrichey v0.97.6 published...