+ 3

Why is my function not working? [Solved!]

This function is not beign activated. Do you know why? This is just an extract from the code I'm writing! It will be released soon! function start() { $("#text1").html("<p>Don't worry! There is nothing to be scared about as listIt is the easiest way to create To-Do lists whilst also giving you in depth tools to customize your lists to your liking!</p>"); $("#text1").append("<p>ListIt allows you to create an infinite amount of To-Do lists so you will never forget a single thing again! To create a list all you have to do is 3 simple things</p><ol><li>Press on the circle with 3 lines on it.</li><li>Press on the green \'Lists\' button</li><li>Press on the blue \'New List\' button</li></ol><br>") $("#navMenu").hide(); amountOfLists = 0; listName = "Your To-Do list!"; }; start()

8th Aug 2020, 12:35 AM
Pieter Edwards
Pieter Edwards - avatar
6 Answers
+ 2
Is this what you mean: function start() { // Do something } $(document).ready(start); Then you can call start() later again...
8th Aug 2020, 1:40 AM
Rowsej
Rowsej - avatar
+ 1
It looks like it should work... Maybe add an alert() or console.log() in the function just to check that it’s being called? Or, make sure that you haven’t declared start as a function or a variable already.
8th Aug 2020, 1:00 AM
Rowsej
Rowsej - avatar
+ 1
It works for me perfectly... strange! I use the SL iOS app; what do you use?
8th Aug 2020, 1:05 AM
Rowsej
Rowsej - avatar
+ 1
I think it's because I changed it from function start() to $(document).ready(function() Do you know if I can name the function name when it's like this?
8th Aug 2020, 1:08 AM
Pieter Edwards
Pieter Edwards - avatar
+ 1
Yes thank you. I needed it so I can make a button that goes to the homepage once your viewing a list! Thank you so much for all your help 😀
8th Aug 2020, 1:42 AM
Pieter Edwards
Pieter Edwards - avatar
+ 1
No worries at all!
8th Aug 2020, 1:57 AM
Rowsej
Rowsej - avatar