Note that there are some explanatory texts on larger screens.

plurals
  1. POSharepoint window scroll not firing
    primarykey
    data
    text
    <p>I have this HTML generated by my SharePoint page (clipped):</p> <pre><code>&lt;body scroll="yes" onload="if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();" class="v4master" style="overflow: scroll" spellcheck="false"&gt; &lt;form name="aspnetForm" method="post" action="/Lists/List/EditNewForm.aspx?ID=2&amp;amp;Source=https%3A%2F%2Fsp2010-test%2Eatwss%2Ecom%2FLists%2FList%2FAllItems%2Easpx" onsubmit="javascript:return WebForm_OnSubmit();" id="aspnetForm" style="overflow: scroll"&gt; // some html here &lt;div id="competenceTotalSum" style="position: absolute; left: 500px; top: 400px; width: 100px; height: 50px; background-color:gray" /&gt; &lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(function(){ $("form#aspnetForm").bind("scroll", function(e){ alert("scroll"); $("#competenceTotalSum").css("top", $(this).scrollTop() + 400); }); }); &lt;/script&gt; // some html here &lt;/form&gt; &lt;/body&gt; </code></pre> <p>Event <code>scroll</code> not firing. I changed <code>scroll</code> attribute of <code>body</code>, overflow properties of <code>body</code> and <code>form</code>, tried to bind <code>scroll</code> event to different objects (<code>window</code>, <code>body</code>, <code>form</code>). When change <code>scroll</code> event to <code>click</code> event - it fires. I didn't find any reasons of it except <code>overflow</code> property of scrolled element.</p>
    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