Embedding Jquery into Lectora

So this is my first post here- by trade I'm a web developer/DBA who was recently moved over to E-Learning.


So I've setup my own Moodle test bed to conduct some experiments, focusing on adding server side code to scorm courses, and some modern design- UX/Responsive/bootstrap/etc...


The Javascript API is not big deal but I wanted to ask how folks are embedding CSS/Jquery/Metadata into Lectora. I mean you can always work with the files after they have been published but I'd like the portability of having the code live right inside the course.


Let me know what you are doing to get this working. Thanks!

Discussion (7)

I rarely use this, but I think the type of your html extension shouldn't be "Top of file scripting" but "Header scripting".


Tim

This is what I thought initially but upon reviewing the scorm package code, I find it places the code before the opening HTML doctype tag- which of course will break the page... is this the method you use?


[ATTACH=CONFIG]440[/ATTACH]


[ATTACH=CONFIG]439[/ATTACH]


But you are correct- I am simply trying to attach my own resources to the course.

it's not going to break the scorm package - we do it all the time.


it doesn't interfere with communication - it simply provides the link to download the resources.

we test in IE 6.5 through 9, and various versions of Firefox, Chrome, and Safari.

Can I ask what browser you are using? we have IE8 as the default here (healthcare industry)

Tim:


As you say that you rarely use it - I use it on every course.


The inclusion of external files ( not html extensions ) depends on WHEN they are needed in the HTML file.


jQuery needs to be available before the HTML is parsed because of the $(document).ready(function() {}


if you call this function and jQuery has not yet loaded then you're basically screwed - so you want to have it available asap - that would mean top of file.

what do you mean about "embedding" into Lectora?


you can simply add a link to the resources as external html objects within the title - same thing with any of the scripts required to run any custom functions..


none of the interactivity will work unless you publish out to html though as lectora wont natively run the scripts.


so - as an external html element add this as top of file scripting





same with css etc

Discussions have been disabled for this post