Lines Matching full:fixed
2 * Gumby Fixed
8 function Fixed($el) { class
10 Gumby.debug('Initializing Fixed Position', $el);
34 // monitor scroll and update fixed elements accordingly
41 Gumby.debug('Re-initializing Fixed Position', $el);
48 Fixed.prototype.setup = function() { class
51 this.fixedPoint = this.parseAttrValue(Gumby.selectAttr.apply(this.$el, ['fixed']));
56 // offset from fixed point
62 // top position when fixed
99 Fixed.prototype.monitorScroll = function() {
116 if((scrollAmount >= fixedPoint) && this.state !== 'fixed') {
121 } else if(scrollAmount < fixedPoint && this.state === 'fixed') {
131 Fixed.prototype.fix = function() {
132 Gumby.debug('Element has been fixed', this.$el);
135 this.state = 'fixed';
138 }).addClass('fixed').removeClass('unfixed pinned').trigger('gumby.onFixed');
147 Fixed.prototype.unfix = function() {
152 this.$el.addClass('unfixed').removeClass('fixed pinned').trigger('gumby.onUnfixed');
156 Fixed.prototype.pin = function() {
162 }).addClass('pinned fixed').removeClass('unfixed').trigger('gumby.onPinned');
166 Fixed.prototype.constrain = function() {
175 Fixed.prototype.measure = function() {
191 Fixed.prototype.parseAttrValue = function(attr) {
192 // px value fixed point
195 // 'top' string fixed point
202 Gumby.error('Cannot find Fixed target: '+attr);
210 Gumby.addInitalisation('fixed', function(all) {
211 $('[data-fixed],[gumby-fixed],[fixed]').each(function() {
228 new Fixed($this);
234 module: 'fixed',
237 Gumby.initialize('fixed');