Jump to content

How to include jQuery script on Page Display Record Template


sobrenome

Recommended Posts

I need to add keyframes to CSS dynamically, so I will need to insert a script to database record display template.

The jQuery library is available on database record display template?

In my case, can I simple add this example script to the end of the template code to dynamically insert the css statement?

<script>
var supportedFlag = $.keyframe.isSupported();
$.keyframe.define([{
    name: 'trapdoor-sequence',
    '0%': {'height': '70px'},
    '30%': {'height': '10px'},
    '60%': {'height': '30px'},
    '100%': {'height': '10px'}
}]); 
</script>

 

 

 

Link to comment
Share on other sites

I have done a quick test with:

<script>
$(document).ready(function(){
  $("body").append("random sentence");});
</script> 

Not working...

:cry:

Where did you add it? jQuery should be loaded as a window element so should be available throughout the framework.

Link to comment
Share on other sites

Hello @Jim M,

Let me explain better. I am just parsing the script code above anywhere in the record display template of the database (Pages > Templates > HTML > Database Templates > Display > record). It doesn't work.

I supose that to load as a window element I have to create a javascript file with the code (Pages > Templates > JS > Page JS > JS > teste_name.js), right?

I have done that, but could not find any documentation on how to include this javascript file in the display record template.

I also have not found any documantation on how to add variables to the script that should be dynamically inserted on each record display.

Could you help? Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...