Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
Recent Tutorials
Top posting users this month
Top Achievers
Who is online?
In total there are 24 users online :: 0 Registered, 0 Hidden and 24 Guests :: 2 Bots
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
[SOLVED] Forumotion: JavaScript Limit
Page 1 of 1 • Share
I was wondering since there is a limit of 50 JavaScripts on Forumotion, can we have 2 or more different JavaScripts in the same JavaScript as long as the effect the same areas?
@SLGray yes, you can include as many scripts as FM's character limit allows in 1 JS file.
For example, most scripts start with a document ready event ( this is jQuery's ) :
So, you can just copy and paste one script after another like so :
Or combine them since they all execute when the document is ready :
For example, most scripts start with a document ready event ( this is jQuery's ) :
- Code:
$(function() {
console.log('Ready !');
});
So, you can just copy and paste one script after another like so :
- Code:
$(function() {
console.log('Ready !');
});
// another script
$(function() {
console.log('Ready again !');
});
// yet another script
$(function() {
console.log('Ready yet again !');
});
Or combine them since they all execute when the document is ready :
- Code:
$(function() {
console.log('Ready !');
// another script
console.log('Ready again !');
// yet another script
console.log('Ready yet again !');
});
- GuestGuest
Mind you, you can only combine scripts into one if they're using the same placement So you'll be ending up with only, what, 5 or 6 JS...
That should help since sometimes the scripts are split into separate JS files, like this :SLGray wrote:I have noticed that my forums load faster now after I combined the JavaScripts.
and that means you need to send a request to get these files. So more files == more requests, which means slightly longer load times.
Hello,
@Ange Tuteur is to better to group the javascripts depending their placements into one javascript instead to have them as separately javascripts? I am thinking it long time ago. Will this reduce the load time?
@Ange Tuteur is to better to group the javascripts depending their placements into one javascript instead to have them as separately javascripts? I am thinking it long time ago. Will this reduce the load time?
Well technically, yes, there'd be a small improvement in load times, especially if there's a lot of files that have to be retrieved. In Chrome you can go to the sources tab, reload the page, and it'll show all the js / css files that were loaded on the page. You can also use the network tab too, to see how long some resources take to load.
- GuestGuest
lel! Oh that's what you meant when you said 'evil programming'... Well, I'll be off now. I'll be checking on AvacWeb sometimes at the most for today.
Enjoy, all!
Samantha.
Enjoy, all!
Samantha.
- Sponsored content
Similar topics
Create an account or log in to leave a reply
You need to be a member in order to leave a reply.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum