Every line of 'scrollto jquery example' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
35 scrollTo(id: string): void { 36 this.mccScrolspyService.scrollTo('My Scrollspy', id); 37 }
43 scrollTo(target, offset) { 44 this.scroll.scrollTo(target, offset); 45 }
39 scrollToSecondToLastItem() { 40 this.setState({ visbleIndex: 19 }); 41 }
126 function scrollToPosition (shouldScroll, position) { 127 const isObject = typeof shouldScroll === 'object' 128 if (isObject && typeof shouldScroll.selector === 'string') { 129 // getElementById would still fail if the selector contains a more complicated query like #main[data-attr] 130 // but at the same time, it doesn't make much sense to select an element with an id and an extra selector 131 const el = hashStartsWithNumberRE.test(shouldScroll.selector) // $flow-disable-line 132 ? document.getElementById(shouldScroll.selector.slice(1)) // $flow-disable-line 133 : document.querySelector(shouldScroll.selector) 134 135 if (el) { 136 let offset = 137 shouldScroll.offset && typeof shouldScroll.offset === 'object' 138 ? shouldScroll.offset 139 : {} 140 offset = normalizeOffset(offset) 141 position = getElementPosition(el, offset) 142 } else if (isValidPosition(shouldScroll)) { 143 position = normalizePosition(shouldScroll) 144 } 145 } else if (isObject && isValidPosition(shouldScroll)) { 146 position = normalizePosition(shouldScroll) 147 } 148 149 if (position) { 150 window.scrollTo(position.x, position.y) 151 } 152 }
3 export function scrollTo(x, y) { 4 scrollPosition = { x, y }; 5 }
34 function __scrollToPosition(scrollPosition) { 35 window.scrollTo(scrollPosition.x, scrollPosition.y); 36 }
42 function scrollTo(selector) { 43 $('#main-content').animate({scrollTop: $(selector).offset().bottom}, 'slow'); 44 }
80 function scrollTo(pos) { 81 iframeMessenger.scrollTo(pos.x, pos.y); 82 }
35 scrollToMiddleItem() { 36 this.setState({ visbleIndex: 12 }); 37 }
38 scrollToTop() { 39 $('html, body').animate({ 40 scrollTop: 0, 41 }, 500); 42 }