Adding Javascript!

Hello guys! I got a question! Can you add Javascript into your blocs project or do you have to manually apply the route of the js file after?

You can add JavaScript in the page settings and the project settings. Footer and Header.

and the css on the style right?

What do you mean CSS on the right?

I mean the css on the style, right?

Hey @Stewie_Griffin, how are you?

Yes, scripts and code…

...your code


...your CSS

You can also reference files in project setting

1 Like

thats what I mean! it doesnt show on the preview right only when you upload? By the way! Hi!!! How is ti going? Im still on the travel agency page, had to code the first page all by myself after watching Lynda tutorials for a month :stuck_out_tongue:

It should apply in preview.

Mate you are committed! Full credit to you.

Hey Buddy (@Malachiman)

Can any of CodePen scripts be added to Blocs 3?
If so, is it a matter adding HTML | CSS | JS to the Page Editor?
Here is an example:

1 Like

Yes you can do that @KBConcepts

You need to check the CSS though, because it can conflict with you page design.

ie. Having a class called .card could be a problem if you have other cards on the page.

That makes sense. :smile:

Thanks!! Will post here the site when it will be over :slight_smile:

It doesn’t show on my preview for some reason

when you preview in browser?

inside the project! trying to add this:
Or can you do it on blocs without the toggle with visibility?

You could, but that code will look better and be less work.

Make sure the JavaScript is In the footer. What exactly is the result you are getting?

Hello @Stewie_Griffin I have a script for that effect if you want, check here:


Hope it helps you…

I just get the whole text with the button under but it doesn’t work

Hey! Im doing it like your example. I just have some questions:
Its says you can style it on the line 4, how can you add:

float: right;
background-color: transparent;
margin-top: 10px;

I tried with the #myBtn on the style section is that correct?