Note that there are some explanatory texts on larger screens.

plurals
  1. POWhen I hit refresh in the browser I lose my jquery programming
    primarykey
    data
    text
    <p>If you take a look at <a href="http://www.kahuna-webstudio.fr/" rel="nofollow">http://www.kahuna-webstudio.fr/</a> and scroll down the page about 50 pixels or so you will see a div on the left side of the screen slide out. I have managed to duplicate this effect but there is one thing that escapes me; and that is when you hit refresh on my page my jquery programming resets. I don't want this to happen. <a href="http://www.kahuna-webstudio.fr/" rel="nofollow">http://www.kahuna-webstudio.fr/</a> has it working perfectly. On their page when scroll down 50 pixels and the left nav appears and even when you hit refresh the left nav is still there. The left nav only disappears when the user scrolls back to the top of the page.</p> <p><strong>What is currently working:</strong> The user scrolls down 296 pixels on my page and the left nav slides out and the user brings the scroll bar back to the top of the page (pixels less than 25) and the left nav slides back and disappears. This is all working. </p> <p><strong>What is not working:</strong> But let's say the user scrolls down 296 pixels and the left nav slides out and then the user hits refresh while they are viewing the page. Well in this case the left nav disappears. My jquery programming is reset. I want the left nav, when the user is at 296 pixels or greater, to always be visible even if the user hits refresh.</p> <p>My code is below. I hope my question makes sense and I welcome any help. Thank you.</p> <pre><code>$(window).scroll(function () { var wintop = $(window).scrollTop(); var docheight = $(document).height(); var winheight = $(window).height(); var newwidthgrow = 80; var smallheight = 0; var smallwidth = 0; //var expanded = "false"; if ((wintop &gt; 296)) { //expanded = "true"; $("#slidebottom").stop().animate({ height: docheight + "px" }, 'fast', function () { $("#slidebottom").stop().animate({ width: newwidthgrow + "px" }, 'slow', function () { $("#slidebottomContents").fadeIn(); }); }); } if ((wintop &lt; 25)) { //expanded = "false"; $("#slidebottom").stop().animate({ height: docheight + "px" }, 'fast', function () { $("#slidebottomContents").fadeOut(function () { $("#slidebottom").stop().animate({ width: smallwidth + "px" }); }); }); } }); </code></pre>
    singulars
    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.
 

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