• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

How do I enter javascript at the end of the code?

Explorer ,
Jun 04, 2017 Jun 04, 2017

Copy link to clipboard

Copied

I need to insert a code or file in javascript or jquery at the end of the code.
Ex: main.js or app.js

Views

326

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Jun 14, 2017 Jun 14, 2017

Hello, after much study, I have arranged a way to do this in an integrated way within Muse, I will leave here the step-by-step guide for anyone who wants to know.

First> Upload .js in 'Files to Upload in menu Muse

Second> include Jquery Injector (Widget) from MuseResources (MUSE RESOURCES™ | jQuery Injector ) and paste the code below:

$.getScript('assets/nameOfUrArchive.js', function(){

});

Please moderators, put this message as the correct answer.

Thank you all for the support

Votes

Translate

Translate
Jun 05, 2017 Jun 05, 2017

Copy link to clipboard

Copied

Hi,

What is this  Javascript intended for?

You can export your .muse as HTML and then tweak or insert any external code or file.

Regards,

Ankush

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 05, 2017 Jun 05, 2017

Copy link to clipboard

Copied

Hello Ankush, first of all thank you for replying.

I would like to do this directly from the Muse panel, using the assets option, but as it is a controller.js it needs to be at the end of the code. So it renders the controller within Preview In Browser.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Jun 05, 2017 Jun 05, 2017

Copy link to clipboard

Copied

Right, that's the issue.

If you will upload it through Muse then you won't have the control over the execution of that Javascript.

Therefore in your case exporting it via HTML will be the best option.

Regards,

Ankush

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 14, 2017 Jun 14, 2017

Copy link to clipboard

Copied

Hello, after much study, I have arranged a way to do this in an integrated way within Muse, I will leave here the step-by-step guide for anyone who wants to know.

First> Upload .js in 'Files to Upload in menu Muse

Second> include Jquery Injector (Widget) from MuseResources (MUSE RESOURCES™ | jQuery Injector ) and paste the code below:

$.getScript('assets/nameOfUrArchive.js', function(){

});

Please moderators, put this message as the correct answer.

Thank you all for the support

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Jun 14, 2017 Jun 14, 2017

Copy link to clipboard

Copied

LATEST

Woah, Thank you so much for this superb workaround and it will be really very helpful for our other user's as well.

Cheers.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines