Remove arctic_scroll
This commit is contained in:
parent
e1c1357d9b
commit
f6ca2176d3
|
@ -1,7 +1,6 @@
|
||||||
#= require jquery3
|
#= require jquery3
|
||||||
#= require jquery_ujs
|
#= require jquery_ujs
|
||||||
#= require jquery.turbolinks
|
#= require jquery.turbolinks
|
||||||
#= require jquery.arctic_scroll
|
|
||||||
#= require turbolinks
|
#= require turbolinks
|
||||||
#= require popper
|
#= require popper
|
||||||
#= require bootstrap
|
#= require bootstrap
|
||||||
|
@ -84,8 +83,6 @@ _ready = ->
|
||||||
aId = announcement.dataset.announcementId
|
aId = announcement.dataset.announcementId
|
||||||
window.localStorage.setItem("announcement#{aId}", true)
|
window.localStorage.setItem("announcement#{aId}", true)
|
||||||
|
|
||||||
$('.arctic_scroll').arctic_scroll speed: 500
|
|
||||||
|
|
||||||
|
|
||||||
$(document).ready _ready
|
$(document).ready _ready
|
||||||
$(document).on 'page:load', _ready
|
$(document).on 'page:load', _ready
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
(function ($) {
|
|
||||||
$.fn.arctic_scroll = function (options) {
|
|
||||||
|
|
||||||
var defaults = {
|
|
||||||
elem: $(this),
|
|
||||||
speed: 500,
|
|
||||||
scroll_selector: 'html,body'
|
|
||||||
};
|
|
||||||
|
|
||||||
var options = $.extend(defaults, options),
|
|
||||||
to_scroll = options.scroll_selector,
|
|
||||||
ua = $.browser;
|
|
||||||
/*
|
|
||||||
if ( ua.msie && ua.version.slice(0,1) == "8" ) {
|
|
||||||
to_scroll = window;
|
|
||||||
} else if ( ua.msie && ua.version.slice(0,1) == "7" ) {
|
|
||||||
to_scroll = window;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
options.elem.click(function(event){
|
|
||||||
event.preventDefault();
|
|
||||||
var offset = ($(this).attr('data-offset')) ? $(this).attr('data-offset') : false,
|
|
||||||
position = ($(this).attr('data-position')) ? $(this).attr('data-position') : false;
|
|
||||||
if (offset) {
|
|
||||||
var toMove = parseInt(offset);
|
|
||||||
$(options.scroll_selector).stop(true, false).animate({scrollTop: ($(this.hash).offset().top + toMove) }, options.speed);
|
|
||||||
} else if (position) {
|
|
||||||
var toMove = parseInt(position);
|
|
||||||
$(options.scroll_selector).stop(true, false).animate({scrollTop: toMove }, options.speed);
|
|
||||||
} else {
|
|
||||||
$(options.scroll_selector).stop(true, false).animate({scrollTop: ($(this.hash).offset().top) }, options.speed);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
};
|
|
||||||
})(jQuery);
|
|
Loading…
Reference in New Issue