Question:
How to combine Javascript?
Siddiq Nx
2013-09-11 06:43:53 UTC
I have been using Blogger for my web hosting.I have been using it since long time.And when I started to learn about some SEO tricks,a website said "Combine CSS and Java Scripts".
I had combined CSS files but I can't do it with Javascript.It is scattered all over the Template Code.Can I know the correct method to combine all Javascripts and copy it in a file?
Can I do it by just copying all the codes into a notepad?So that I can upload it to GitHub.Please help ASAP.
Remember : I am just a beginner in scripting and I don't know much of the codes in Javascript.I have searched all over the Google and I only found so many scripts and code stuffs.I can't understand any of those codes and tricks.Please answer me in a simple manner.
I need an expert or professional in this field(net scripting) to answer this.
Thanks in advance...
Four answers:
galt_57
2013-09-13 20:11:39 UTC
Javascript can be written in this way. This is usually known as the more modern "unobtrusive style" of Javascript, however if Javascript is scattered all over and embedded in the HTML it would have to be totally re-written before it could be combined and placed in an external file. The usual problem is that in the older style the onevent Javascript calls are embedded in the HTML, such inside button tags. In the "unobtrusive style" the handler for the button is assigned inside a Javascript initialization function. Also in the older style the Javascript is often placed at the bottom of the HTML body. In the "unobtrusive style" the Javascript is placed in an external file which is loaded in the head and initialized by a load event.
2014-06-16 11:45:56 UTC
try to use Javascript widget
2014-07-16 06:05:47 UTC
use html/javascript widget to combine
2014-07-16 05:43:30 UTC
combine with text widget


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...