Javascript/Bootstrap scroll to section only after the page loads

W Toku

We have a website which uses jquery to scroll to a previously opened section when the user visits a page. It is using the bootstrap code below to get the previous section via a cookie and then scroll to it.

$(".collapse").on('[url removed, login to view]', function(e) {

var scrollToSection = $.cookie('scrollToSection');

if (scrollToSection != null && $("#" + scrollToSection).length) {

$('html, body').animate({

scrollTop: $('#' + scrollToSection).offset().top

}, 1000);

}

}

This works fine, but if the user expands a section after the page loads it will still scroll to the previous section. We want to fix this so that it only scrolls to the active section when the page first loads. If you are interested in the project let me know and I can walk you through the process to replicate this on our development site.

Umiejętności: CSS, HTML, HTML5, JavaScript, jQuery / Prototype

Zobacz więcej: page scroll bootstrap, page loads popover javascript, scroll auto javascript stop page, animate scroll imagem javascript, relative scroll smooth javascript, image scroll loop javascript, horizontal scroll gallery javascript, scroll iframe javascript outside, scroll box javascript continued, scroll panel javascript, scroll gallery javascript, php progress bar page loads submit, scroll css javascript, scroll box javascript, vertical scroll banner javascript

Numer ID Projektu: #11750061

Przyznane użytkownikowi:

shailendra041090

HI, i can do this work easily.Please provide me link. I can start the work now only. I can do this now only.

$10 USD w 1 dzień
(50 Ocen)
4.5

21 freelancerów złożyło ofertę na średnią kwotę w wysokości $27 do tego projektu.

Rapha

I estimate 2 hours to fix your code. Contact me.

$78 USD w ciągu 1 dnia
(72 Ocen)
6.5
VnBestSolutions

Dear Sir. We claim to get it done perfectly for you EXACTLY in the way you want it - Kindly give we a chance and we will prove myself - Ready to prove our words, let's get it done right away and I mean RIGHT AWAY !! Lo Więcej

$45 USD w ciągu 1 dnia
(131 Ocen)
6.6
BaNgan

Hi, Here is my solution: - So we need a flag to check as if the page load first time. The flag is true at initial and will set to false right after the animate method work. - This will make the collapse item can't Więcej

$35 USD w ciągu 1 dnia
(105 Ocen)
6.0
Appel

Hi If you can give further directions and steps to reproduce on you dev site, I am happy to fix this for you right now. Just let me know. Kind regards, Albert

$25 USD w ciągu 1 dnia
(45 Ocen)
5.1
mvladt

Hi elliottbenzle, I can fix it right now. :) Also I have more than 4 years of experience working with CSS, HTML, PHP and Javascript + jQuery, so I'm sure I will finish the task on time, within the budget and exactly Więcej

$25 USD w ciągu 0 dni
(55 Ocen)
5.0
webcast

Hello sir/mam, I am good at : 1. WordPress web development 2. PSD to HTML 3. Responsive web development 4. Graphics Designing 5. Photoshop 6. PHP 7. html + CSS Styling 8. js & jQuery. you can check my Więcej

$30 USD w ciągu 1 dnia
(24 Ocen)
4.5
$25 USD w ciągu 1 dnia
(15 Ocen)
3.6
amoghbhatnagar

I 've 7+years of experience in javascript, jquery, Ajax etc........ i've resolved this types of bugs in .......... i can fix it.............

$30 USD w ciągu 1 dnia
(1 Ocena)
3.0
yogesh5490

Dear Sir, I am a Full time PHP, Wordpress( Woocommerce, themeforest themes etc... ) Developer with Native English Skills. I have 5+ years of experience in web applications and can do all-round development. I hav Więcej

$10 USD w ciągu 0 dni
(12 Ocen)
3.4
irfankhokhar1986

Hi Got it your point and all clear task so please give this job i will do for you with perfect timeline archive I have 7 year experience web development Give me your email id so i will send you my portfolio a Więcej

$10 USD w ciągu 0 dni
(3 Ocen)
2.7
$25 USD w ciągu 1 dnia
(10 Ocen)
3.0
lakhankaushal

Hello, My name is Lakhan, I have a vast working experience in WordPress website development and have developed number of WordPress Themes in my career. I have been using foundation and bootstrap for Making Responsive Więcej

$25 USD w ciągu 1 dnia
(8 Ocen)
2.3
ramboo895

Hi, I am very interested in your project and I am ready to help you with pleasure. I just checked your job post and understood that what kind of designer and developer you want actually.I am going to provide you the b Więcej

$35 USD w ciągu 1 dnia
(3 Ocen)
1.8
rajesh44944

Hello Sir I have more than 5 year work experience in php web development. I have worked in jquery angular js, react js and bootstrap 3 . I will fixed this issue with in 4 and 5 hour . Pleas Więcej

$25 USD w ciągu 1 dnia
(1 Ocena)
1.8
andersonstinger

Hello. I know exactly what you need. Please contact me via chat to start to work right now. It is simply to fix.

$25 USD w ciągu 10 dni
(2 Ocen)
1.6
jasphineinfotech

Hello, Hope your business is doing great! My name is Herryson Narciso. I am represent a Jaspine Infotech Pvt. Ltd. We are providing IT Services like web Development, Web Desgin,woo-commerce developing,SEO and Mo Więcej

$30 USD w ciągu 1 dnia
(2 Ocen)
1.6
muhnoorazhari

Hi can I help u

$30 USD w ciągu 1 dnia
(0 Ocen)
0.0
$25 USD w ciągu 1 dnia
(0 Ocen)
0.0
sandhurajbir75

I have gone through your job description and the requirements which you are searching, fully matches with my technical skills and I assure to get the work completed with accuracy and within quick time frame. I have Więcej

$20 USD w ciągu 1 dnia
(0 Ocen)
0.0
MoohHHooM

i will do it for free :) Więcej

$10 USD w ciągu 0 dni
(0 Ocen)
0.0