Add external scripts |
Post Reply |
Author | |
hesusko
Newbie Joined: Sep 08 2015 Location: Phillipines Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: Sep 08 2015 at 4:56pm |
How can I add external scripts into my website?
e.g <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> I can't use the script block element because it only creates a block. I can't add a source to it, or maybe I can I just don't know how. I just started using open element so this may be a dumb question. Thanks for the future help :)
|
|
hesusko
|
|
Dmit OE
Admin Group Joined: May 31 2012 Status: Offline Points: 5283 |
Post Options
Thanks(1)
|
Hi,
Just add a Code Block (Source) of either HTML or OtherScript type, position Header, and copy the code to it. However, in your particular case, you add the SECOND jQuery (one is already added by openElement) which often provokes errors; you shoudl rather go to Project->Preferences->last tab "Expert settings", and enter 2.1.3 as jQuery version, or if you wish copy-paste the entire URL: https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js Also, if you need to include a script file which you publish yourself, put this file into Files/Other (you can create any subfolder structure inside) and use the relative link, ex. "Files/Other/myJS/myscript.js". Have a nice day D
|
|
hesusko
Newbie Joined: Sep 08 2015 Location: Phillipines Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Thanks a lot!
|
|
hesusko
|
|
Zarby
Newbie Joined: Feb 03 2016 Location: France Status: Offline Points: 1 |
Post Options
Thanks(0)
|
Hi,
According to the wiki page of 'expert settings', it seems not possible to specify the jQuery version with the latest version of openElement. I am trying to convert in https version of my website. I used a manual setting of the .htaccess to redirect http to https with success. But navigators blocks scripts (non https). For example, the carroussel is not running. Do I need to open a 'new idea' post ? Best Regards |
|
sapiens nihil affirmat quod non probet
|
|
Dmit OE
Admin Group Joined: May 31 2012 Status: Offline Points: 5283 |
Post Options
Thanks(1)
|
Hi,
1) Here is the Expert settings tab in the latest version, with 2 options corresponding to jQuery: https://www.dropbox.com/s/x6y3ijlrr3de1kz/SS_expert_Settings.png?dl=0 You can put either the version number or the full URL to jQuery you want. Why do you say it does not work? 2) The carroussel is probably not running because of missing jQuery, as the script link is relative; if you use external online scripts, it's up to you to use HTTPS URLs. Have a nice day D |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |