Advertisement
Guest User

Untitled

a guest
Nov 1st, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. <div id="trip_mainImg">
  2. <div id="BannerPIC_n" runat="server" class="inside" data-stellar-offset-parent="false"
  3. data-stellar-horizontal-offset="40" data-stellar-vertical-offset="150" data-stellar-background-ratio="1.25" style="background-position: 50% 60px;background-attachment:fixed; background-image: url(test.jpg);">
  4. </div>
  5. </div>
  6.  
  7. height = $(window).height();
  8.  
  9. 50% 0px
  10.  
  11. $(function () {
  12. $.stellar.positionProperty.limit = {
  13.  
  14. setTop: function ($element, newTop, originalTop) {
  15. var limit = 300;
  16.  
  17. // Check if we're going over the limit
  18. if (newTop - originalTop > limit) {
  19.  
  20. // Call default position property with our limited value
  21. $.stellar.positionProperty.position.setTop.call(null, $element, originalTop - limit, originalTop);
  22.  
  23. } else {
  24.  
  25. // Otherwise, delegate to the 'setTop' method of the 'position' adapter
  26. $.stellar.positionProperty.position.setTop.apply(null, arguments);
  27.  
  28. }
  29. },
  30.  
  31. // Nothing custom needed here, so we'll just use the built in adapter:
  32. setLeft: $.stellar.positionProperty.position.setLeft
  33.  
  34. }
  35. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement