Note that there are some explanatory texts on larger screens.

plurals
  1. PORails project, based on a parallax site, anchor links do not work when navigated off the page when the id's exsist
    primarykey
    data
    text
    <p>So, I am working on rails project that I have inherited from another company, I am a front end developer with little rails knowledge but my problem relates to javascript;</p> <p>The issue is the the links work fine when on the page where the id's exist but If I navigate away and click the links I cant get back....</p> <p>I have been told that this is an issue but I know understand how to solve the problem: </p> <p>'body onclick="if(stWidget.buttonClicked==false){stWidget.stopClosing=false;stWidget.openDuration=0;stWidget.stClose(100);}" class="ready"'</p> <p>The mark up:</p> <pre><code>&lt;nav class="main"&gt; &lt;%= link_to "Register", registration_event_path(@event), :class =&gt; "register", :style =&gt; "background-color: #{@event.main_division_colour}" %&gt; &lt;ul&gt; &lt;li&gt;&lt;%= link_to 'Overview', event_path(@event, :anchor =&gt; 'overview') %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= link_to 'Why Attend', event_path(@event, :anchor =&gt; 'why_go') %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= link_to 'Speakers', event_path(@event, :anchor =&gt; 'speakers') %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= link_to 'Schedule', event_path(@event, :anchor =&gt; 'schedule') %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= link_to 'Sponsors', event_path(@event, :anchor =&gt; 'sponsors') %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= link_to 'Venue', event_path(@event, :anchor =&gt; 'venue') %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= link_to 'Summary', event_path(@event, :anchor =&gt; 'summary') %&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/nav&gt; </code></pre> <p>The scripts using requireJS;</p> <pre><code>require [ 'jquery', 'jquery_ujs', 'parallax', 'slider', 'views/shared/section_height_fixer', 'views/shared/flash', 'views/shared/cookies_notification', 'views/modal', 'views/shared/smooth_scroller', 'views/image_viewer', 'views/scroll_spy', 'views/shared/division_selector' ], (jQuery, a, b, c, SectionHeightFixer, Flash, CookiesNotification, Modal, NavScroller, ImageViewer, ScrollSpy, DivisionSelector) -&gt; $(document).ready -&gt; new CookiesNotification new Modal '.modal', 'carousel' new Modal '.single-modal', 'single' new Modal '.form-modal', 'form' new Modal '.registration-details li a', 'single' new NavScroller(".events nav.main ul a[href*='#'] ,#spy a, #schedule nav ul a, .reg-down") new SectionHeightFixer new Flash $('div.alert') if $('div.alert').length &gt; 0 new DivisionSelector $('#events-calendar-header select') if $('#events-calendar-header select').length &gt; 0 unless Modernizr.touch $('#event &gt; section').each -&gt; $(this).parallax("50%", 0.2) $('.image-viewer').each -&gt; new ImageViewer el: this $('#WhyAttendCarousel').carousel interval: 2000 $('#MainCarousel').carousel interval: 2000 $(".navigation-btn").click -&gt; $("nav.main").slideToggle(250) $("body").addClass("ready") </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload