x

Add script in header using custom app

Hi,

I created one custom element app( like scroll to top ) and installed in weebly site. It is working fine in one page if i dragged in that page.

But My question is how this app will work all the pages?

and

How can we inject the script in eaither footer or header?

850 Views
Message 1 of 2
Report
1 REPLY 1

Since the footer area of Weebly is shared on all pages, so you can place your app inside the footer area and the code/script available through the code will be added to all pages.

The other option is that you can inject your code by targeting the header or footer class from your app code as follows:

jQuery(document).ready(function(){

jQuery('your-header-class-here').append('<style>your styles here</style>');

});

I hope it helps.

786 Views
Message 2 of 2
Report