Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="trip_mainImg">
- <div id="BannerPIC_n" runat="server" class="inside" data-stellar-offset-parent="false"
- 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);">
- </div>
- </div>
- height = $(window).height();
- 50% 0px
- $(function () {
- $.stellar.positionProperty.limit = {
- setTop: function ($element, newTop, originalTop) {
- var limit = 300;
- // Check if we're going over the limit
- if (newTop - originalTop > limit) {
- // Call default position property with our limited value
- $.stellar.positionProperty.position.setTop.call(null, $element, originalTop - limit, originalTop);
- } else {
- // Otherwise, delegate to the 'setTop' method of the 'position' adapter
- $.stellar.positionProperty.position.setTop.apply(null, arguments);
- }
- },
- // Nothing custom needed here, so we'll just use the built in adapter:
- setLeft: $.stellar.positionProperty.position.setLeft
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement